From bbc3fb821dfea0421c5412fb8d8d97e65873b9dc Mon Sep 17 00:00:00 2001 From: TimePath Date: Sun, 22 May 2016 15:12:20 +1000 Subject: [PATCH] Kill more setself --- qcsrc/common/vehicles/sv_vehicles.qc | 1 - qcsrc/common/vehicles/vehicle/racer.qc | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index 0b16b1517..c1ad7a791 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -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)) diff --git a/qcsrc/common/vehicles/vehicle/racer.qc b/qcsrc/common/vehicles/vehicle/racer.qc index 7b433a84e..26221f5ed 100644 --- a/qcsrc/common/vehicles/vehicle/racer.qc +++ b/qcsrc/common/vehicles/vehicle/racer.qc @@ -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) -- 2.39.2