From: Mario Date: Wed, 15 Apr 2015 01:22:26 +0000 (+1000) Subject: Fix target locking not working on turrets X-Git-Tag: xonotic-v0.8.1~85 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=62aaa3e5bc2e7e4864b8c4c677c3fb67a055cc54;p=xonotic%2Fxonotic-data.pk3dir.git Fix target locking not working on turrets --- diff --git a/qcsrc/server/vehicles/vehicles.qc b/qcsrc/server/vehicles/vehicles.qc index 96d54e3de..0a4eb6f3e 100644 --- a/qcsrc/server/vehicles/vehicles.qc +++ b/qcsrc/server/vehicles/vehicles.qc @@ -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)