From: TimePath Date: Sun, 22 May 2016 04:13:07 +0000 (+1000) Subject: Delete unused SELFPARAM X-Git-Tag: xonotic-v0.8.2~907 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7d82382d0b2a20f56dd2559edf8fc3171ab55700;p=xonotic%2Fxonotic-data.pk3dir.git Delete unused SELFPARAM --- diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index 5368cb642..47e98d619 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -167,7 +167,6 @@ void Draw_ShowNames(entity this) void Draw_ShowNames_All() { - SELFPARAM(); if (!autocvar_hud_shownames) return; LL_EACH(shownames_ent, true, { entity entcs = entcs_receiver(i); diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc index d2e85cf68..b2d0a84d3 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc @@ -1755,7 +1755,7 @@ bool ons_Teleport(entity player, entity tele_target, float range, bool tele_effe // ============== MUTATOR_HOOKFUNCTION(ons, reset_map_global) -{SELFPARAM(); +{ FOREACH_CLIENT(IS_PLAYER(it), { it.ons_roundlost = false; it.ons_deathloc = '0 0 0'; diff --git a/qcsrc/common/minigames/sv_minigames.qc b/qcsrc/common/minigames/sv_minigames.qc index fe10459ff..18e1d3216 100644 --- a/qcsrc/common/minigames/sv_minigames.qc +++ b/qcsrc/common/minigames/sv_minigames.qc @@ -122,7 +122,7 @@ bool minigame_CheckSend() } int minigame_addplayer(entity minigame_session, entity player) -{SELFPARAM(); +{ if ( player.active_minigame ) { if ( player.active_minigame == minigame_session ) diff --git a/qcsrc/common/mutators/mutator/superspec/superspec.qc b/qcsrc/common/mutators/mutator/superspec/superspec.qc index b3f39dc3d..adcc3b2d7 100644 --- a/qcsrc/common/mutators/mutator/superspec/superspec.qc +++ b/qcsrc/common/mutators/mutator/superspec/superspec.qc @@ -435,7 +435,6 @@ MUTATOR_HOOKFUNCTION(superspec, ClientConnect) MUTATOR_HOOKFUNCTION(superspec, PlayerDies) { - SELFPARAM(); FOREACH_CLIENT(IS_SPEC(it), LAMBDA( if(it.autospec_flags & ASF_FOLLOWKILLER && IS_PLAYER(frag_attacker) && it.enemy == frag_target) { diff --git a/qcsrc/common/triggers/subs.qc b/qcsrc/common/triggers/subs.qc index c202d7125..99dc5217d 100644 --- a/qcsrc/common/triggers/subs.qc +++ b/qcsrc/common/triggers/subs.qc @@ -289,7 +289,7 @@ void SUB_CalcMove (vector tdest, float tspeedtype, float tspeed, void() func) } void SUB_CalcMoveEnt (entity ent, vector tdest, float tspeedtype, float tspeed, void() func) -{SELFPARAM(); +{ WITHSELF(ent, SUB_CalcMove(tdest, tspeedtype, tspeed, func)); } @@ -357,6 +357,6 @@ void SUB_CalcAngleMove (vector destangle, float tspeedtype, float tspeed, void() } void SUB_CalcAngleMoveEnt (entity ent, vector destangle, float tspeedtype, float tspeed, void() func) -{SELFPARAM(); +{ WITHSELF(ent, SUB_CalcAngleMove (destangle, tspeedtype, tspeed, func)); } diff --git a/qcsrc/common/triggers/target/music.qc b/qcsrc/common/triggers/target/music.qc index cbc584d86..b67d47d32 100644 --- a/qcsrc/common/triggers/target/music.qc +++ b/qcsrc/common/triggers/target/music.qc @@ -70,7 +70,7 @@ spawnfunc(target_music) target_music_sendto(this, MSG_INIT, 0); } void TargetMusic_RestoreGame() -{SELFPARAM(); +{ for(entity e = world; (e = find(e, classname, "target_music")); ) { if(e.targetname == "") diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index 9b9046aa4..95b7225cc 100644 --- a/qcsrc/common/weapons/all.qh +++ b/qcsrc/common/weapons/all.qh @@ -113,7 +113,6 @@ void W_PROP_think() } STATIC_INIT_LATE(W_PROP_reloader) { - SELFPARAM(); entity e = W_PROP_reloader = new_pure(W_PROP_reloader); WITHSELF(e, (e.think = W_PROP_think)()); } diff --git a/qcsrc/common/weapons/weapon/blaster.qc b/qcsrc/common/weapons/weapon/blaster.qc index 6bb741b0d..24d532934 100644 --- a/qcsrc/common/weapons/weapon/blaster.qc +++ b/qcsrc/common/weapons/weapon/blaster.qc @@ -98,7 +98,7 @@ void W_Blaster_Attack( float atk_spread, float atk_delay, float atk_lifetime) -{SELFPARAM(); +{ vector s_forward = v_forward * cos(atk_shotangle * DEG2RAD) + v_up * sin(atk_shotangle * DEG2RAD); W_SetupShot_Dir(actor, s_forward, false, 3, SND_LASERGUN_FIRE, CH_WEAPON_B, atk_damage); diff --git a/qcsrc/common/weapons/weapon/hook.qc b/qcsrc/common/weapons/weapon/hook.qc index 468c64b9a..206223d01 100644 --- a/qcsrc/common/weapons/weapon/hook.qc +++ b/qcsrc/common/weapons/weapon/hook.qc @@ -187,7 +187,6 @@ void W_Hook_Attack2(Weapon thiswep, entity actor) METHOD(Hook, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { - SELFPARAM(); if (fire & 1) { if(!actor.hook) if(!(actor.hook_state & HOOK_WAITING_FOR_RELEASE)) @@ -285,7 +284,6 @@ METHOD(Hook, wr_setup, void(entity thiswep)) } METHOD(Hook, wr_checkammo1, bool(Hook thiswep, entity actor)) { - SELFPARAM(); if (!thiswep.ammo_factor) return true; if(actor.hook) return actor.ammo_fuel > 0; diff --git a/qcsrc/common/weapons/weapon/porto.qc b/qcsrc/common/weapons/weapon/porto.qc index 00aa0153c..60d2a8b70 100644 --- a/qcsrc/common/weapons/weapon/porto.qc +++ b/qcsrc/common/weapons/weapon/porto.qc @@ -102,7 +102,7 @@ void W_Porto_Fail(float failhard) } void W_Porto_Remove(entity p) -{SELFPARAM(); +{ if(p.porto_current.realowner == p && p.porto_current.classname == "porto") { WITHSELF(p.porto_current, W_Porto_Fail(1)); diff --git a/qcsrc/lib/self.qh b/qcsrc/lib/self.qh index 092a8945b..d028bc28f 100644 --- a/qcsrc/lib/self.qh +++ b/qcsrc/lib/self.qh @@ -19,6 +19,8 @@ #if 1 #undef self #define self (this, self) + #undef SELFPARAM + #define SELFPARAM() const entity this = __self #endif // Step 4: kill unstructured setself diff --git a/qcsrc/lib/warpzone/server.qc b/qcsrc/lib/warpzone/server.qc index 8bd5d692f..97abe0e6d 100644 --- a/qcsrc/lib/warpzone/server.qc +++ b/qcsrc/lib/warpzone/server.qc @@ -838,7 +838,6 @@ void WarpZone_Think() void WarpZone_StartFrame() { - SELFPARAM(); if (!warpzone_initialized) { warpzone_initialized = true; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index d446322b3..7ba3ed535 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -707,8 +707,7 @@ void ClientInit_CheckUpdate() } void ClientInit_Spawn() -{SELFPARAM(); - +{ entity e = new_pure(clientinit); e.think = ClientInit_CheckUpdate; Net_LinkEntity(e, false, 0, ClientInit_SendEntity); diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index e601bfc6c..3cea4fcc7 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -190,7 +190,6 @@ void GameCommand_allready(float request) void GameCommand_allspec(float request, float argc) { - SELFPARAM(); switch (request) { case CMD_REQUEST_COMMAND: @@ -989,7 +988,6 @@ void GameCommand_make_mapinfo(float request) void GameCommand_moveplayer(float request, float argc) { - SELFPARAM(); switch (request) { case CMD_REQUEST_COMMAND: @@ -1155,7 +1153,6 @@ void GameCommand_nospectators(float request) void GameCommand_playerdemo(float request, float argc) { - SELFPARAM(); switch (request) { case CMD_REQUEST_COMMAND: @@ -1327,7 +1324,6 @@ void GameCommand_setbots(float request, float argc) void GameCommand_shuffleteams(float request) { - SELFPARAM(); switch (request) { case CMD_REQUEST_COMMAND: diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index e19ef52e8..c07d57048 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -333,8 +333,6 @@ void VoteThink() // Resets the state of all clients, items, weapons, waypoints, ... of the map. void reset_map(bool dorespawn) { - SELFPARAM(); - if (time <= game_starttime && round_handler_IsActive()) round_handler_Reset(game_starttime); MUTATOR_CALLHOOK(reset_map_global); diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 583391d22..91f8ec501 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -523,7 +523,7 @@ void RandomSeed_Think() this.SendFlags |= 1; } void RandomSeed_Spawn() -{SELFPARAM(); +{ randomseed = new_pure(randomseed); randomseed.think = RandomSeed_Think; Net_LinkEntity(randomseed, false, 0, RandomSeed_Send); @@ -1522,7 +1522,6 @@ only called if a time or frag limit has expired */ void NextLevel() { - SELFPARAM(); gameover = true; intermission_running = 1; @@ -2026,7 +2025,7 @@ void EndFrame() float redirection_timeout; float redirection_nextthink; float RedirectionThink() -{SELFPARAM(); +{ float clients_found; if(redirection_target == "") diff --git a/qcsrc/server/mutators/mutator/gamemode_assault.qc b/qcsrc/server/mutators/mutator/gamemode_assault.qc index d961fa14d..b1d3857b4 100644 --- a/qcsrc/server/mutators/mutator/gamemode_assault.qc +++ b/qcsrc/server/mutators/mutator/gamemode_assault.qc @@ -293,7 +293,6 @@ void assault_new_round() // they win. Otherwise the defending team wins once the timelimit passes. int WinningCondition_Assault() { - SELFPARAM(); WinningConditionHelper(); // set worldstatus int status = WINNING_NO; diff --git a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc index 990049728..5e11666b8 100644 --- a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc @@ -375,7 +375,6 @@ MUTATOR_HOOKFUNCTION(ft, MakePlayerObserver) MUTATOR_HOOKFUNCTION(ft, PlayerDies) { - SELFPARAM(); if(round_handler_IsActive()) if(round_handler_CountdownRunning()) { diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index bb9561051..f2315035f 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -1043,7 +1043,7 @@ spawnfunc(info_player_race) } void race_ClearRecords() -{SELFPARAM(); +{ float i; for(i = 0; i < MAX_CHECKPOINTS; ++i) diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index db5f9fe90..b7c81925f 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -210,7 +210,6 @@ void w_ready(Weapon thiswep, entity actor, .entity weaponentity, int fire) .float prevwarntime; bool weapon_prepareattack_checkammo(Weapon thiswep, entity actor, bool secondary) { - SELFPARAM(); if ((actor.items & IT_UNLIMITED_WEAPON_AMMO)) return true; bool ammo = false; if (secondary) ammo = thiswep.wr_checkammo2(thiswep, actor);