From 9b783eb66fdc7c05836e9f0645db1181f4e29c77 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 11 Jun 2016 23:22:32 +1000 Subject: [PATCH] Remove some more unnecessary WITHSELFs --- qcsrc/common/vehicles/sv_vehicles.qc | 2 +- qcsrc/common/vehicles/vehicle/racer.qc | 2 +- qcsrc/common/vehicles/vehicle/raptor.qc | 4 ++-- qcsrc/server/cl_client.qc | 2 +- qcsrc/server/command/vote.qc | 2 +- qcsrc/server/g_damage.qc | 2 +- qcsrc/server/mutators/mutator/gamemode_assault.qc | 4 ++-- qcsrc/server/weapons/weaponsystem.qc | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index 2709054b9..b5452ba5a 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -1074,7 +1074,7 @@ void vehicles_enter(entity pl, entity veh) CSQCModel_UnlinkEntity(veh); Vehicle info = Vehicles_from(veh.vehicleid); - WITHSELF(veh, info.vr_enter(info, veh)); + info.vr_enter(info, veh); antilag_clear(pl, CS(pl)); } diff --git a/qcsrc/common/vehicles/vehicle/racer.qc b/qcsrc/common/vehicles/vehicle/racer.qc index e212d3124..ba3d02577 100644 --- a/qcsrc/common/vehicles/vehicle/racer.qc +++ b/qcsrc/common/vehicles/vehicle/racer.qc @@ -332,7 +332,7 @@ bool racer_frame(entity this) crosshair_trace(this); w_shotdir.z = normalize(trace_endpos - org).z * 0.5; .entity weaponentity = weaponentities[0]; - WITHSELF(vehic, wep1.wr_think(wep1, vehic, weaponentity, 1)); + wep1.wr_think(wep1, vehic, weaponentity, 1); } if(autocvar_g_vehicle_racer_rocket_locktarget) diff --git a/qcsrc/common/vehicles/vehicle/raptor.qc b/qcsrc/common/vehicles/vehicle/raptor.qc index 1e364e549..9dbf5825f 100644 --- a/qcsrc/common/vehicles/vehicle/raptor.qc +++ b/qcsrc/common/vehicles/vehicle/raptor.qc @@ -411,7 +411,7 @@ bool raptor_frame(entity this) if(PHYS_INPUT_BUTTON_ATCK2(this)) { .entity weaponentity = weaponentities[1]; - WITHSELF(vehic, wep2a.wr_think(wep2a, vehic, weaponentity, 2)); + wep2a.wr_think(wep2a, vehic, weaponentity, 2); vehic.delay = time + autocvar_g_vehicle_raptor_bombs_refire; vehic.lip = time; } @@ -423,7 +423,7 @@ bool raptor_frame(entity this) if(PHYS_INPUT_BUTTON_ATCK2(this)) { .entity weaponentity = weaponentities[1]; - WITHSELF(vehic, wep2b.wr_think(wep2b, vehic, weaponentity, 2)); + wep2b.wr_think(wep2b, vehic, weaponentity, 2); vehic.delay = time + autocvar_g_vehicle_raptor_flare_refire; vehic.lip = time; } diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index fe73c8734..bd12c1e5c 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -711,7 +711,7 @@ void ClientInit_Spawn() setthink(e, ClientInit_CheckUpdate); Net_LinkEntity(e, false, 0, ClientInit_SendEntity); - WITHSELF(e, ClientInit_CheckUpdate(e)); + ClientInit_CheckUpdate(e); } /* diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index bb687486e..b1482999d 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -340,7 +340,7 @@ void reset_map(bool dorespawn) FOREACH_ENTITY_ORDERED(IS_NOT_A_CLIENT(it), { if (it.reset) { - WITHSELF(it, it.reset(it)); + WITHSELF(it, it.reset(it)); // needs WITHSELF, as some spawnfuncs are set to .reset continue; } if (it.team_saved) it.team = it.team_saved; diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index df88116d7..d0415c9e2 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -539,7 +539,7 @@ void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypo targ.iceblock = ice; targ.revival_time = 0; - WITHSELF(ice, Ice_Think(ice)); + Ice_Think(ice); RemoveGrapplingHook(targ); diff --git a/qcsrc/server/mutators/mutator/gamemode_assault.qc b/qcsrc/server/mutators/mutator/gamemode_assault.qc index d5685ca44..cf27a8f0d 100644 --- a/qcsrc/server/mutators/mutator/gamemode_assault.qc +++ b/qcsrc/server/mutators/mutator/gamemode_assault.qc @@ -224,8 +224,8 @@ void assault_roundstart_use(entity this, entity actor, entity trigger) else it.team = NUM_TEAM_1; - // Dubbles as teamchange - WITHSELF(it, turret_respawn(it)); + // Doubles as teamchange + turret_respawn(it); )); } void assault_roundstart_use_this(entity this) diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index c2bccef95..21057e4a0 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -767,5 +767,5 @@ void W_DropEvent(.void(Weapon, entity actor) event, entity player, float weapon_ { Weapon w = Weapons_from(weapon_type); weapon_dropevent_item = weapon_item; - WITHSELF(player, w.event(w, player)); + w.event(w, player); } -- 2.39.2