Don't set the last radar time if the entity number is above the max number of clients

This commit is contained in:
smallmodel 2024-10-06 19:19:44 +02:00
parent d19328230c
commit f5558d106e
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -1044,7 +1044,7 @@ static void SV_BuildClientSnapshot( client_t *client ) {
frame->first_entity = svs.nextSnapshotEntities;
for ( i = 0 ; i < entityNumbers.numSnapshotEntities ; i++ ) {
ent = SV_GentityNum(entityNumbers.snapshotEntities[i]);
if (ent->client) {
if (ent->client && ent->s.number < svs.iNumClients) {
assert(ent->s.number < MAX_CLIENTS);
client->lastRadarTime[ent->s.number] = svs.time;
}