summaryrefslogtreecommitdiff
path: root/src/game/bg_pmove.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2006-01-12 17:05:09 +0000
committerTim Angus <tim@ngus.net>2006-01-12 17:05:09 +0000
commit7436505136de3c6b2034d80c53843ce214b82286 (patch)
tree3f2be71c8010460aa6920960cf35ab24b776285e /src/game/bg_pmove.c
parentce70dcdb3f657f8fa1cf48ca9ba9a6074f40c3f5 (diff)
* Fixed lcannon charge storage exploit
* Fixed psaw/cgun inappropriate effects bug * Lcannon now has a minimum charge value
Diffstat (limited to 'src/game/bg_pmove.c')
-rw-r--r--src/game/bg_pmove.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index 107d7929..a2a9f543 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -2601,6 +2601,10 @@ static void PM_BeginWeaponChange( int weapon )
if( pm->ps->weaponstate == WEAPON_DROPPING )
return;
+ //special case to prevent storing a charged up lcannon
+ if( pm->ps->weapon == WP_LUCIFER_CANNON )
+ pm->ps->stats[ STAT_MISC ] = 0;
+
PM_AddEvent( EV_CHANGE_WEAPON );
pm->ps->weaponstate = WEAPON_DROPPING;
pm->ps->weaponTime += 200;
@@ -2865,8 +2869,15 @@ static void PM_Weapon( void )
}
//erp this looks confusing
- if( pm->ps->stats[ STAT_MISC ] > 0 )
+ if( pm->ps->stats[ STAT_MISC ] > LCANNON_MIN_CHARGE )
attack1 = !attack1;
+ else if( pm->ps->stats[ STAT_MISC ] > 0 )
+ {
+ pm->ps->stats[ STAT_MISC ] = 0;
+ pm->ps->weaponTime = 0;
+ pm->ps->weaponstate = WEAPON_READY;
+ return;
+ }
break;
default:
@@ -2905,6 +2916,7 @@ static void PM_Weapon( void )
{
pm->ps->weaponTime = 0;
pm->ps->weaponstate = WEAPON_READY;
+ pm->ps->generic1 = WPM_NOTFIRING;
return;
}
}
@@ -2920,6 +2932,7 @@ static void PM_Weapon( void )
{
pm->ps->weaponTime = 0;
pm->ps->weaponstate = WEAPON_READY;
+ pm->ps->generic1 = WPM_NOTFIRING;
return;
}
}