]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Kill more setself
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 22 May 2016 05:12:20 +0000 (15:12 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 22 May 2016 05:12:20 +0000 (15:12 +1000)
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/vehicle/racer.qc

index 0b16b15172b0f777048dbfd6ec517021bd071115..c1ad7a79166c14212ed2bb63892bb04107887a34 100644 (file)
@@ -955,7 +955,6 @@ bool vehicle_impulse(entity this, int imp)
 void vehicles_enter(entity pl, entity veh)
 {
     SELFPARAM();
-       entity oldself = self;
 
    // Remove this when bots know how to use vehicles
        if((IS_BOT_CLIENT(pl) && !autocvar_g_vehicles_allow_bots))
index 7b433a84e92013dd10773b4c7b85c6de6bf8818a..26221f5edcd2b812dc9f6cd02394b54e384df763 100644 (file)
@@ -316,7 +316,6 @@ bool racer_frame(entity this)
        this.movement = vehic.velocity += df * PHYS_INPUT_TIMELENGTH;
 
 #ifdef SVQC
-       setself(vehic);
 
        Weapon wep1 = WEP_RACER;
        if (!forbidWeaponUse(this))
@@ -333,11 +332,9 @@ bool racer_frame(entity this)
                crosshair_trace(this);
                w_shotdir.z = normalize(trace_endpos - org).z * 0.5;
                .entity weaponentity = weaponentities[0];
-               wep1.wr_think(wep1, vehic, weaponentity, 1);
+               WITHSELF(vehic, wep1.wr_think(wep1, vehic, weaponentity, 1));
        }
 
-       setself(this);
-
        if(autocvar_g_vehicle_racer_rocket_locktarget)
        {
                if(vehic.vehicle_last_trace == time + autocvar_g_vehicle_racer_thinkrate)