From a0e6e69aa2a26c2dd5a6b3abe5e73c00975a1ab0 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sat, 28 Jul 2001 00:31:19 +0000 Subject: Saw blade launcher --- src/game/g_main.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'src/game/g_main.c') diff --git a/src/game/g_main.c b/src/game/g_main.c index 12c39e80..3d5fb1e8 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -1854,26 +1854,34 @@ int start, end; // start = trap_Milliseconds(); ent = &g_entities[0]; - for (i=0 ; iinuse ) { + + for ( i = 0; i < level.num_entities; i++, ent++ ) + { + if( !ent->inuse ) continue; - } // clear events that are too old - if ( level.time - ent->eventTime > EVENT_VALID_MSEC ) { - if ( ent->s.event ) { + if( level.time - ent->eventTime > EVENT_VALID_MSEC ) + { + if( ent->s.event ) + { ent->s.event = 0; // &= EV_EVENT_BITS; - if ( ent->client ) { + if ( ent->client ) + { ent->client->ps.externalEvent = 0; //ent->client->ps.events[0] = 0; //ent->client->ps.events[1] = 0; } } - if ( ent->freeAfterEvent ) { + + if( ent->freeAfterEvent ) + { // tempEntities or dropped items completely go away after their event G_FreeEntity( ent ); continue; - } else if ( ent->unlinkAfterEvent ) { + } + else if( ent->unlinkAfterEvent ) + { // items that will respawn will hide themselves after their pickup event ent->unlinkAfterEvent = qfalse; trap_UnlinkEntity( ent ); @@ -1881,9 +1889,8 @@ start = trap_Milliseconds(); } // temporary entities don't think - if ( ent->freeAfterEvent ) { + if ( ent->freeAfterEvent ) continue; - } //TA: calculate the acceleration of this entity if( ent->evaluateAcceleration ) @@ -1893,7 +1900,8 @@ start = trap_Milliseconds(); continue; } - if ( ent->s.eType == ET_MISSILE ) { + if ( ent->s.eType == ET_MISSILE ) + { G_RunMissile( ent ); continue; } -- cgit