From a377106a6f71ecdfb8e80c012524bbb25ac6fa89 Mon Sep 17 00:00:00 2001 From: Roman Tetelman Date: Sat, 3 Oct 2009 12:21:08 +0000 Subject: * fix for not being able to sell ckit while repairing (fixes #21) --- src/game/bg_misc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/game/bg_misc.c') diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index dab1eff9..ad4a1d3f 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -3376,11 +3376,15 @@ BG_PlayerCanChangeWeapon */ qboolean BG_PlayerCanChangeWeapon( playerState_t *ps ) { + // Can always change from ckit + if( ps->weapon == WP_HBUILD ) + return qtrue; + // 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; } -- cgit