summaryrefslogtreecommitdiff
path: root/src/cgame
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/cgame
parentce70dcdb3f657f8fa1cf48ca9ba9a6074f40c3f5 (diff)
* Fixed lcannon charge storage exploit
* Fixed psaw/cgun inappropriate effects bug * Lcannon now has a minimum charge value
Diffstat (limited to 'src/cgame')
-rw-r--r--src/cgame/cg_weapons.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c
index f37078f4..ecb2499b 100644
--- a/src/cgame/cg_weapons.c
+++ b/src/cgame/cg_weapons.c
@@ -742,7 +742,7 @@ CG_MachinegunSpinAngle
*/
#define SPIN_SPEED 0.9
#define COAST_TIME 1000
-static float CG_MachinegunSpinAngle( centity_t *cent )
+static float CG_MachinegunSpinAngle( centity_t *cent, qboolean firing )
{
int delta;
float angle;
@@ -760,12 +760,11 @@ static float CG_MachinegunSpinAngle( centity_t *cent )
angle = cent->pe.barrelAngle + delta * speed;
}
- if( cent->pe.barrelSpinning == !( cent->currentState.eFlags & EF_FIRING ) )
+ if( cent->pe.barrelSpinning == !firing )
{
cent->pe.barrelTime = cg.time;
cent->pe.barrelAngle = AngleMod( angle );
- cent->pe.barrelSpinning = !!( cent->currentState.eFlags & EF_FIRING );
- //TA: um?
+ cent->pe.barrelSpinning = firing;
}
return angle;
@@ -876,7 +875,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
barrel.hModel = weapon->barrelModel;
angles[ YAW ] = 0;
angles[ PITCH ] = 0;
- angles[ ROLL ] = CG_MachinegunSpinAngle( cent );
+ angles[ ROLL ] = CG_MachinegunSpinAngle( cent, firing );
AnglesToAxis( angles, barrel.axis );
CG_PositionRotatedEntityOnTag( &barrel, &gun, weapon->weaponModel, "tag_barrel" );