diff --git a/code/game/g_client.c b/code/game/g_client.c index 737707cd..ee88fac5 100644 --- a/code/game/g_client.c +++ b/code/game/g_client.c @@ -426,7 +426,7 @@ void CopyToBodyQue( gentity_t *ent ) { body->s.eFlags |= EF_KAMIKAZE; // check if there is a kamikaze timer around for this owner - for (i = 0; i < MAX_GENTITIES; i++) { + for (i = 0; i < level.num_entities; i++) { e = &g_entities[i]; if (!e->inuse) continue; diff --git a/code/game/g_combat.c b/code/game/g_combat.c index ed0de7f2..2fbd3170 100644 --- a/code/game/g_combat.c +++ b/code/game/g_combat.c @@ -241,7 +241,7 @@ void GibEntity( gentity_t *self, int killer ) { //if this entity still has kamikaze if (self->s.eFlags & EF_KAMIKAZE) { // check if there is a kamikaze timer around for this owner - for (i = 0; i < MAX_GENTITIES; i++) { + for (i = 0; i < level.num_entities; i++) { ent = &g_entities[i]; if (!ent->inuse) continue;