]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert "Vehicle antilag"
authorJakob MG <jakob_mg@hotmail.com>
Tue, 25 Oct 2011 08:53:46 +0000 (10:53 +0200)
committerJakob MG <jakob_mg@hotmail.com>
Tue, 25 Oct 2011 08:53:46 +0000 (10:53 +0200)
This reverts commit 6bc4bcbfd12aa53b22fef9f8de202f11151dfc13.

qcsrc/server/g_subs.qc
qcsrc/server/g_world.qc
qcsrc/server/vehicles/racer.qc
qcsrc/server/vehicles/raptor.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/vehicles/vehicles.qc
qcsrc/server/w_common.qc

index a908353a4c93b1c5a3116285cb2764c44e429f38..6a62d61b5d423e43debf69ab9461e031c427142c 100644 (file)
@@ -391,12 +391,7 @@ void tracebox_antilag_force_wz (entity source, vector v1, vector mi, vector ma,
                // take players back into the past
                FOR_EACH_PLAYER(player)
                        if(player != forent)
-                       {
-                           antilag_takeback(player, time - lag);
-                           if(player.vehicle)
-                    antilag_takeback(player.vehicle, time - lag);
-                       }
-                               
+                               antilag_takeback(player, time - lag);
        }
 
        // do the trace
@@ -410,12 +405,7 @@ void tracebox_antilag_force_wz (entity source, vector v1, vector mi, vector ma,
        {
                FOR_EACH_PLAYER(player)
                        if(player != forent)
-                       {
-                           antilag_restore(player);
-                           if(player.vehicle)
-                    antilag_restore(player.vehicle);
-                       }
-                               
+                               antilag_restore(player);
        }
 
        // restore shooter solid type
index 6d60fd8c0b4a88fb7c200c86f0067871bd094a58..d6a39859ea1492e20db693de97b72ac7ef2ee0d7 100644 (file)
@@ -2852,8 +2852,6 @@ void EndFrame()
                self.hitsound = FALSE;
                self.typehitsound = FALSE;
                antilag_record(self, altime);
-               if(self.vehicle)
-            antilag_record(self.vehicle, altime);
        }
 }
 
index 7595027439bf731bed17c365e38956490f05552a..e3c74c5e190c864a1d0832834729d2fc4b534979 100644 (file)
@@ -273,9 +273,10 @@ float racer_frame()
         return 1;
     }
 
-    
     racer_align4point();
-    vh_crosshair_trace(player);
+
+    crosshair_trace(player);
+
     racer.angles_x *= -1;
 
     // Yaw
index 4712777ee8f7db4f31078f9af528fd40bac9e705..201c186c37947d65ad983efd0b4c67c1f0484120 100644 (file)
@@ -344,7 +344,7 @@ float raptor_frame()
         player.BUTTON_ATCK = player.BUTTON_ATCK2 = 0;
         return 1;
     }
-    vh_crosshair_trace(player);
+    crosshair_trace(player);
 
     vector vang;
     vang = raptor.angles;
index 00e8f3382372f98529bc75ee8b774401217c66e4..f43ec08e52f35f9a792a172a82c6a9da3e4f0093 100644 (file)
@@ -145,7 +145,7 @@ void spiderbot_rocket_do()
     if not (self.owner.BUTTON_ATCK2)
         return;
 
-    vh_crosshair_trace(self.owner);
+    crosshair_trace(self.owner);
 
     v = gettaginfo(self.tur_head,gettagindex(self.tur_head,"tag_fire"));
     rocket = vehicles_projectile("spiderbot_rocket_launch", "weapons/rocket_fire.wav",
index 051a9136ef7a21a3f2e919996f1302a86941b050..c4e2875380486575ed766684f7def98d1053ff28 100644 (file)
@@ -111,40 +111,6 @@ void CSQCVehicleSetup(entity own, float vehicle_id)
     dont before calling.
 
 **/
-void vh_crosshair_trace(entity player)
-{
-    float lag; 
-    entity pl;
-    
-    lag = ANTILAG_LATENCY(self);
-    if(lag < 0.001)
-        lag = 0;
-    if(clienttype(self) != CLIENTTYPE_REAL)
-        lag = 0;
-    if(autocvar_g_antilag == 0 || self.cvar_cl_noantilag)
-        lag = 0; // only do hitscan, but no antilag
-
-    if(lag)
-        FOR_EACH_PLAYER(pl)
-            if(pl != self)
-            {
-                antilag_takeback(pl, time - lag);
-                if(pl.vehicle)
-                    antilag_takeback(pl.vehicle, time - lag);
-
-            }
-
-    crosshair_trace(player);
-
-    if(lag)
-        FOR_EACH_PLAYER(pl)
-            if(pl != self)
-            {
-                antilag_restore(pl);
-                if(pl.vehicle)
-                    antilag_restore(pl.vehicle);
-            }
-}
 .entity lock_target;
 .float  lock_strength;
 .float  lock_time;
@@ -178,7 +144,7 @@ void vehicles_locktarget(float incr, float decr, float _lock_time)
         if(trace_ent.deadflag != DEAD_NO)
             trace_ent = world;
 
-        if not (trace_ent.vehicle_flags & VHF_ISVEHICLE || trace_ent.turrcaps_flags & TFL_TURRCAPS_ISTURRET || trace_ent.classname == "player")
+        if not (trace_ent.vehicle_flags & VHF_ISVEHICLE || trace_ent.turrcaps_flags & TFL_TURRCAPS_ISTURRET)
             trace_ent = world;
     }
 
index 00a9d2ed09d0a1d5c19ff9d1b1a0709d67534270..1a995191c2f81025e9c9235d145649f0b9f82c42 100644 (file)
@@ -419,13 +419,7 @@ void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, f
                if(lag)
                        FOR_EACH_PLAYER(pl)
                                if(pl != self)
-                               {
-                                   antilag_takeback(pl, time - lag);
-                    if(pl.vehicle)
-                        antilag_takeback(pl.vehicle, time - lag);
-
-                               }
-                                       
+                                       antilag_takeback(pl, time - lag);
 
                oldself = self;
                self = proj;
@@ -504,12 +498,7 @@ void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, f
                if(lag)
                        FOR_EACH_PLAYER(pl)
                                if(pl != self)
-                               {
-                                   antilag_restore(pl);
-                                   if(pl.vehicle)
-                        antilag_restore(pl.vehicle);
-                               }
-                                       
+                                       antilag_restore(pl);
 
                remove(proj);