]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/vehicles/vehicles.qc
Bring back raptor straferoll, fix raptor mode 1 movement, fix raptor bomb reload...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / vehicles / vehicles.qc
index 5c484595977a6b441ef90863e7b095c70563b02f..b96a2e90004083219120e950ef9c8f5e3451b2d2 100644 (file)
@@ -97,6 +97,9 @@ void vehicles_locktarget(float incr, float decr, float _lock_time)
         self.lock_time      = 0;
     }
 
+    if(self.lock_time > time)
+        return;
+
     if(trace_ent != world)
     {
         if(teams_matter && trace_ent.team == self.team)
@@ -109,9 +112,6 @@ void vehicles_locktarget(float incr, float decr, float _lock_time)
             trace_ent = world;
     }
 
-    if(self.lock_time > time)
-        return;
-
     if(self.lock_target == world && trace_ent != world)
         self.lock_target = trace_ent;
 
@@ -125,7 +125,10 @@ void vehicles_locktarget(float incr, float decr, float _lock_time)
     }
     else
     {
-        self.lock_strength = max(self.lock_strength - decr, 0);
+        if(trace_ent)
+            self.lock_strength = max(self.lock_strength - decr * 2, 0);
+        else
+            self.lock_strength = max(self.lock_strength - decr, 0);
 
         if(self.lock_strength == 0)
             self.lock_target = world;