diff options
Diffstat (limited to 'src/game/g_active.c')
-rw-r--r-- | src/game/g_active.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c index a8889ef1..f9e14243 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -986,11 +986,17 @@ void ClientThink_real( gentity_t *ent ) //randomly disable the jet pack if damaged if( BG_gotItem( UP_JETPACK, client->ps.stats ) && - BG_activated( UP_JETPACK, client->ps.stats ) && - ( client->lastDamageTime + JETPACK_DISABLE_TIME > level.time ) ) + BG_activated( UP_JETPACK, client->ps.stats ) ) { - if( random( ) > JETPACK_DISABLE_CHANCE ) - client->ps.pm_type = PM_NORMAL; + if( client->lastDamageTime + JETPACK_DISABLE_TIME > level.time ) + { + if( random( ) > JETPACK_DISABLE_CHANCE ) + client->ps.pm_type = PM_NORMAL; + } + + //switch jetpack off if no reactor + if( !level.reactorPresent ) + BG_deactivateItem( UP_JETPACK, client->ps.stats ); } // set up for pmove |