diff options
Diffstat (limited to 'src/game/g_active.c')
-rw-r--r-- | src/game/g_active.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c index b9ab899..fcb888a 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -587,6 +587,16 @@ void ClientTimerActions( gentity_t *ent, int msec ) client->time1000 += msec; client->time10000 += msec; + // zoom detection + if( BG_InventoryContainsWeapon( WP_MASS_DRIVER, ent->client->ps.stats ) + || BG_InventoryContainsWeapon( WP_LAS_GUN, ent->client->ps.stats ) ) + { + if( ( ucmd->buttons & BUTTON_ATTACK2 ) && !( ent->client->ps.eFlags & EF_ZOOM ) ) + client->ps.eFlags |= EF_ZOOM; + else if( !( ucmd->buttons & BUTTON_ATTACK2 ) && ( ent->client->ps.eFlags & EF_ZOOM ) ) + client->ps.eFlags &= ~EF_ZOOM; + } + if( aForward == 0 && aRight == 0 ) stopped = qtrue; else if( aForward <= 64 && aRight <= 64 ) |