]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_common.qc
Vehicle antilag
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_common.qc
index 1a995191c2f81025e9c9235d145649f0b9f82c42..00a9d2ed09d0a1d5c19ff9d1b1a0709d67534270 100644 (file)
@@ -419,7 +419,13 @@ 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);
+                               {
+                                   antilag_takeback(pl, time - lag);
+                    if(pl.vehicle)
+                        antilag_takeback(pl.vehicle, time - lag);
+
+                               }
+                                       
 
                oldself = self;
                self = proj;
@@ -498,7 +504,12 @@ void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, f
                if(lag)
                        FOR_EACH_PLAYER(pl)
                                if(pl != self)
-                                       antilag_restore(pl);
+                               {
+                                   antilag_restore(pl);
+                                   if(pl.vehicle)
+                        antilag_restore(pl.vehicle);
+                               }
+                                       
 
                remove(proj);