diff options
author | Michael Levin <risujin@fastmail.fm> | 2009-10-03 11:19:54 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:14:53 +0000 |
commit | b6fd1bffca359783d14cd2000d39cd422ce64eb3 (patch) | |
tree | 140c616799d80bbd252c570b8cbe7ca8738ea308 /src/game/bg_pmove.c | |
parent | 616b5ea15bf22be383df083523174fbefec1cd97 (diff) |
Another bugfix, Lucifer Cannon won't start charging again after an overcharge.
Diffstat (limited to 'src/game/bg_pmove.c')
-rw-r--r-- | src/game/bg_pmove.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 78d22689..45cf89e0 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -2971,6 +2971,14 @@ static void PM_Weapon( void ) attack1 = pm->cmd.buttons & BUTTON_ATTACK; attack2 = pm->cmd.buttons & BUTTON_ATTACK2; attack3 = qfalse; + + // Prevent firing of the Lucifer Cannon after an overcharge + if( pm->ps->weaponstate == WEAPON_NEEDS_RESET ) + { + if( attack1 ) + return; + pm->ps->weaponstate = WEAPON_READY; + } if( attack1 || pm->ps->stats[ STAT_MISC ] > 0 ) attack2 = qfalse; @@ -2985,6 +2993,12 @@ static void PM_Weapon( void ) pm->ps->weaponstate = WEAPON_READY; return; } + else + { + // Overcharge + pm->ps->weaponTime = 0; + pm->ps->weaponstate = WEAPON_NEEDS_RESET; + } } if( pm->ps->stats[ STAT_MISC ] > LCANNON_MIN_CHARGE ) @@ -3157,7 +3171,8 @@ static void PM_Weapon( void ) pm->ps->torsoTimer = TIMER_ATTACK; } - pm->ps->weaponstate = WEAPON_FIRING; + if( pm->ps->weaponstate != WEAPON_NEEDS_RESET ) + pm->ps->weaponstate = WEAPON_FIRING; // take an ammo away if not infinite if( !BG_FindInfinteAmmoForWeapon( pm->ps->weapon ) ) |