Madjor Fix: New Player data overwrites old/connected players

This commit is contained in:
Afonso Clerigo Mendes de Sousa 2025-10-29 20:24:38 +00:00
parent 15f87631e2
commit 95f5a86dd5
2 changed files with 1 additions and 1 deletions

BIN
API

Binary file not shown.

View File

@ -145,7 +145,7 @@ void *db_write_thread(void *arg) {
if (packet.cars[i].driver_GUID[0] == '\0') {
continue; // Skip empty slots
}
printf("[D] User disconnected (%d): GUID=%s, Name=%s\n", i, packet.cars[i].driver_GUID, packet.cars[i].driver_name);
// printf("[D] User disconnected (%d): GUID=%s, Name=%s\n", i, packet.cars[i].driver_GUID, packet.cars[i].driver_name);
// If the car is not connected, we still need to update its status in the db
const char *disconnect_query = "UPDATE users SET is_connect = false, current_server = NULL WHERE driver_guid = $1;";
const char *disconnect_paramValues[1] = {packet.cars[i].driver_GUID};