mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-24 05:01:40 +00:00
Make kamikaze timer loops use level.num_entities instead of MAX_GENTITIES
Optimization. Many other loops use level.num_entities, there was no special reason that MAX_GENTITIES was used for these.
This commit is contained in:
parent
57eae5da91
commit
1633ac5b93
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue