Use the entity number rather than the client's clientNum

The number must match the entity number parameter used in G_GetEntity().
This fixes a crash caused by gclient struct being reset when a client reconnects to the same player slot
This commit is contained in:
smallmodel committed 2025-06-01 00:35:38 +02:00
1 parent 95dff2536b
commit 023770f63e
1 file changed
+1 -1
+1 -1
View File
@@ -950,7 +950,7 @@ void DM_Manager::Score(Player *player)
continue;
}
iPlayerList[j] = currentPlayer->client->ps.clientNum;
iPlayerList[j] = currentPlayer->edict - g_entities;
j++;
}