From 921d0b7f04fb683b0a34add71dced0f286e7c887 Mon Sep 17 00:00:00 2001 From: Michael Levin Date: Sat, 3 Oct 2009 11:22:09 +0000 Subject: * Turrets back to their "dumb" behavior Pounce changes: * Mechanics simplified, descriptions in tremulous.h * Client side prediction (no jerkiness) * Pounce will gradually cancel if released in midair or release with insufficent charge --- src/game/g_buildable.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/game/g_buildable.c') diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 7a8cd126..133559d7 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -2077,11 +2077,11 @@ qboolean HMGTurret_TrackEnemy( gentity_t *self ) RotatePointAroundVector( dirToTarget, xNormal, dttAdjusted, -rotAngle ); vectoangles( dirToTarget, self->turretAim ); - //if pointing at a valid target (not necessarily the original) return true - VectorMA( self->s.pos.trBase, MGTURRET_RANGE, dirToTarget, end ); - trap_Trace( &tr, self->s.pos.trBase, NULL, NULL, end, - self->s.number, MASK_SHOT ); - return HMGTurret_CheckTarget( self, g_entities + tr.entityNum, qfalse ); + //fire if target is within accuracy + return ( abs( angularDiff[ YAW ] ) - angularSpeed <= + MGTURRET_ACCURACY_TO_FIRE ) && + ( abs( angularDiff[ PITCH ] ) - angularSpeed <= + MGTURRET_ACCURACY_TO_FIRE ); } -- cgit