Fix target locking not working on turrets
authorMario <zacjardine@y7mail.com>
Wed, 15 Apr 2015 01:22:26 +0000 (11:22 +1000)
committerMario <zacjardine@y7mail.com>
Wed, 15 Apr 2015 01:22:26 +0000 (11:22 +1000)
qcsrc/server/vehicles/vehicles.qc

index 96d54e3..0a4eb6f 100644 (file)
@@ -274,11 +274,11 @@ void vehicles_locktarget(float incr, float decr, float _lock_time)
 
         if(trace_ent.deadflag != DEAD_NO)
             trace_ent = world;
-
-        if(!trace_ent.vehicle_flags & VHF_ISVEHICLE ||
-                               trace_ent.turrcaps_flags & TFL_TURRCAPS_ISTURRET ||
-                               trace_ent.takedamage == DAMAGE_TARGETDRONE)
-            trace_ent = world;
+        if(!(
+            (trace_ent.vehicle_flags & VHF_ISVEHICLE) || 
+            (trace_ent.turrcaps_flags & TFL_TURRCAPS_ISTURRET) || 
+            (trace_ent.takedamage == DAMAGE_TARGETDRONE)
+            ) { trace_ent = world; }
     }
 
     if(self.lock_target == world && trace_ent != world)