diff options
Diffstat (limited to 'src/game/bg_misc.c')
-rw-r--r-- | src/game/bg_misc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 5198fb28..02db5993 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -5430,6 +5430,21 @@ int BG_GetValueOfPlayer( playerState_t *ps ) } /* +================= +BG_PlayerCanChangeWeapon +================= +*/ +qboolean BG_PlayerCanChangeWeapon( playerState_t *ps ) +{ + // Do not allow Lucifer Cannon "canceling" via weapon switch + if( ps->weapon == WP_LUCIFER_CANNON && + ps->stats[ STAT_MISC ] > LCANNON_CHARGE_TIME_MIN ) + return qfalse; + + return ps->weaponTime <= 0 || ps->weaponstate != WEAPON_FIRING; +} + +/* =============== atof_neg |