]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/vehicles/vehicle/racer.qc
Clean out some more self uses from vehicle code
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / vehicles / vehicle / racer.qc
index e57acf95fa44a8937b45af35ae6301bb53fe058b..f3670a839e59b4b6ec5c1e756df3608f204fe483 100644 (file)
@@ -191,8 +191,6 @@ bool racer_frame(entity this)
                return;
        }
 
-       setself(vehic);
-
        racer_align4point(vehic, PHYS_INPUT_TIMELENGTH);
 
        PHYS_INPUT_BUTTON_ZOOM(this) = PHYS_INPUT_BUTTON_CROUCH(this) = false;
@@ -311,6 +309,8 @@ bool racer_frame(entity this)
        this.movement = vehic.velocity += df * PHYS_INPUT_TIMELENGTH;
 
 #ifdef SVQC
+       setself(vehic);
+
        Weapon wep1 = WEP_RACER;
        if (!forbidWeaponUse(this))
        if (PHYS_INPUT_BUTTON_ATCK(this))
@@ -329,6 +329,8 @@ bool racer_frame(entity this)
                wep1.wr_think(wep1, vehic, weaponentity, 1);
        }
 
+       setself(this);
+
        if(autocvar_g_vehicle_racer_rocket_locktarget)
        {
                vehicles_locktarget(vehic, (1 / autocvar_g_vehicle_racer_rocket_locking_time) * frametime,
@@ -394,8 +396,6 @@ bool racer_frame(entity this)
 
        setorigin(this, vehic.origin + '0 0 32');
        this.velocity = vehic.velocity;
-
-       setself(this);
 }
 
 void racer_think()