]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 96d54e3de7bfa832da6a1d6ba8458031389deed8..0a4eb6f3e2c804707b517be836592783af63f148 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)