mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +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;
|
body->s.eFlags |= EF_KAMIKAZE;
|
||||||
|
|
||||||
// check if there is a kamikaze timer around for this owner
|
// 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];
|
e = &g_entities[i];
|
||||||
if (!e->inuse)
|
if (!e->inuse)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -241,7 +241,7 @@ void GibEntity( gentity_t *self, int killer ) {
|
||||||
//if this entity still has kamikaze
|
//if this entity still has kamikaze
|
||||||
if (self->s.eFlags & EF_KAMIKAZE) {
|
if (self->s.eFlags & EF_KAMIKAZE) {
|
||||||
// check if there is a kamikaze timer around for this owner
|
// 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];
|
ent = &g_entities[i];
|
||||||
if (!ent->inuse)
|
if (!ent->inuse)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue