From 8d0a921cbdfa70fd39234301b809f489df10068e Mon Sep 17 00:00:00 2001 From: Asa Kravets Date: Sat, 3 Oct 2009 13:10:00 +0000 Subject: Removed basilisk turret grabbing --- src/game/g_buildable.c | 25 +++++++++++-------------- src/game/tremulous.h | 1 - 2 files changed, 11 insertions(+), 15 deletions(-) (limited to 'src/game') diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index dd7822b7..7bebe95c 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -2255,10 +2255,7 @@ qboolean HMGTurret_TrackEnemy( gentity_t *self ) { vec3_t dirToTarget, dttAdjusted, angleToTarget, angularDiff, xNormal; vec3_t refNormal = { 0.0f, 0.0f, 1.0f }; - float temp, rotAngle, angularSpeed; - - angularSpeed = self->lev1Grabbed ? MGTURRET_ANGULARSPEED_GRAB : - MGTURRET_ANGULARSPEED; + float temp, rotAngle; VectorSubtract( self->enemy->s.pos.trBase, self->s.pos.trBase, dirToTarget ); VectorNormalize( dirToTarget ); @@ -2274,10 +2271,10 @@ qboolean HMGTurret_TrackEnemy( gentity_t *self ) angularDiff[ YAW ] = AngleSubtract( self->s.angles2[ YAW ], angleToTarget[ YAW ] ); //if not pointing at our target then move accordingly - if( angularDiff[ PITCH ] < 0 && angularDiff[ PITCH ] < (-angularSpeed) ) - self->s.angles2[ PITCH ] += angularSpeed; - else if( angularDiff[ PITCH ] > 0 && angularDiff[ PITCH ] > angularSpeed ) - self->s.angles2[ PITCH ] -= angularSpeed; + if( angularDiff[ PITCH ] < 0 && angularDiff[ PITCH ] < (-MGTURRET_ANGULARSPEED) ) + self->s.angles2[ PITCH ] += MGTURRET_ANGULARSPEED; + else if( angularDiff[ PITCH ] > 0 && angularDiff[ PITCH ] > MGTURRET_ANGULARSPEED ) + self->s.angles2[ PITCH ] -= MGTURRET_ANGULARSPEED; else self->s.angles2[ PITCH ] = angleToTarget[ PITCH ]; @@ -2290,10 +2287,10 @@ qboolean HMGTurret_TrackEnemy( gentity_t *self ) self->s.angles2[ PITCH ] = (-360) + MGTURRET_VERTICALCAP; //if not pointing at our target then move accordingly - if( angularDiff[ YAW ] < 0 && angularDiff[ YAW ] < ( -angularSpeed ) ) - self->s.angles2[ YAW ] += angularSpeed; - else if( angularDiff[ YAW ] > 0 && angularDiff[ YAW ] > angularSpeed ) - self->s.angles2[ YAW ] -= angularSpeed; + if( angularDiff[ YAW ] < 0 && angularDiff[ YAW ] < ( -MGTURRET_ANGULARSPEED ) ) + self->s.angles2[ YAW ] += MGTURRET_ANGULARSPEED; + else if( angularDiff[ YAW ] > 0 && angularDiff[ YAW ] > MGTURRET_ANGULARSPEED ) + self->s.angles2[ YAW ] -= MGTURRET_ANGULARSPEED; else self->s.angles2[ YAW ] = angleToTarget[ YAW ]; @@ -2302,9 +2299,9 @@ qboolean HMGTurret_TrackEnemy( gentity_t *self ) vectoangles( dirToTarget, self->turretAim ); //fire if target is within accuracy - return ( abs( angularDiff[ YAW ] ) - angularSpeed <= + return ( abs( angularDiff[ YAW ] ) - MGTURRET_ANGULARSPEED <= MGTURRET_ACCURACY_TO_FIRE ) && - ( abs( angularDiff[ PITCH ] ) - angularSpeed <= + ( abs( angularDiff[ PITCH ] ) - MGTURRET_ANGULARSPEED <= MGTURRET_ACCURACY_TO_FIRE ); } diff --git a/src/game/tremulous.h b/src/game/tremulous.h index 04ea59f0..975a390d 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -560,7 +560,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define MGTURRET_SPLASHDAMAGE 100 #define MGTURRET_SPLASHRADIUS 100 #define MGTURRET_ANGULARSPEED 12 -#define MGTURRET_ANGULARSPEED_GRAB 8 #define MGTURRET_ACCURACY_TO_FIRE 0 #define MGTURRET_VERTICALCAP 30 // +/- maximum pitch #define MGTURRET_REPEAT 150 -- cgit