Merge branch 'master' into Mario/turrets
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / vehicles / vehicles.qc
index 96d54e3..695e3db 100644 (file)
@@ -1,3 +1,5 @@
+#include "../../common/turrets/util.qh"
+
 float autocvar_g_vehicles_crush_dmg;
 float autocvar_g_vehicles_crush_force;
 float autocvar_g_vehicles_delayspawn;
@@ -275,9 +277,7 @@ 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)
+               if(!((trace_ent.vehicle_flags & VHF_ISVEHICLE) || (trace_ent.turret_flags & TUR_FLAG_ISTURRET)))
             trace_ent = world;
     }