summaryrefslogtreecommitdiff
path: root/src/game/g_buildable.c
diff options
context:
space:
mode:
authorMichael Levin <risujin@fastmail.fm>2009-10-03 11:22:09 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:14:55 +0000
commit921d0b7f04fb683b0a34add71dced0f286e7c887 (patch)
treea36457b10f4f9f7508faa02740ba70598bc7d29c /src/game/g_buildable.c
parent6fb39257554ff42768a38caf790ef223c42d6705 (diff)
* 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
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r--src/game/g_buildable.c10
1 files changed, 5 insertions, 5 deletions
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 );
}