From: TimePath Date: Tue, 22 Mar 2016 07:45:54 +0000 (+1100) Subject: Remove unused SELFPARAM() X-Git-Tag: xonotic-v0.8.2~1053 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3f397e7bd1b2f66ebd246c8fa7a23256eedcbda7;p=xonotic%2Fxonotic-data.pk3dir.git Remove unused SELFPARAM() --- diff --git a/qcsrc/client/hud/panel/weapons.qc b/qcsrc/client/hud/panel/weapons.qc index 44499566e..c465caf4f 100644 --- a/qcsrc/client/hud/panel/weapons.qc +++ b/qcsrc/client/hud/panel/weapons.qc @@ -21,7 +21,6 @@ int weaponorder_cmp(int i, int j, entity pass) void HUD_Weapons() { - SELFPARAM(); // declarations WepSet weapons_stat = WepSet_GetFromStat(); int i; diff --git a/qcsrc/client/player_skeleton.qc b/qcsrc/client/player_skeleton.qc index 49da661ad..c8abdc6f5 100644 --- a/qcsrc/client/player_skeleton.qc +++ b/qcsrc/client/player_skeleton.qc @@ -110,7 +110,7 @@ void free_skeleton_from_frames(entity e) } void skeleton_from_frames(entity e, bool is_dead) -{SELFPARAM(); +{ TC(bool, is_dead); float m = e.modelindex; if(!e.skeletonindex) diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index cf25209c7..c49fa65fc 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -1002,7 +1002,6 @@ float HUD_WouldDrawScoreboard() { float average_accuracy; vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) { - SELFPARAM(); WepSet weapons_stat = WepSet_GetFromStat(); WepSet weapons_inmap = WepSet_GetFromStat_InMap(); float initial_posx = pos.x; diff --git a/qcsrc/common/effects/qc/rubble.qh b/qcsrc/common/effects/qc/rubble.qh index 73744e622..6b36b2c53 100644 --- a/qcsrc/common/effects/qc/rubble.qh +++ b/qcsrc/common/effects/qc/rubble.qh @@ -8,7 +8,6 @@ class(Rubble).float creationtime; void RubbleLimit(string cname, float limit, void(entity) deleteproc) { - SELFPARAM(); entity e; entity oldest; float c; diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc index c17c78659..f47763882 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc @@ -1923,7 +1923,7 @@ MUTATOR_HOOKFUNCTION(ons, PlayerSpawn) } MUTATOR_HOOKFUNCTION(ons, PlayerDies) -{SELFPARAM(); +{ frag_target.ons_deathloc = frag_target.origin; entity l; for(l = ons_worldgeneratorlist; l; l = l.ons_worldgeneratornext) diff --git a/qcsrc/common/monsters/spawn.qc b/qcsrc/common/monsters/spawn.qc index 70459263f..5e1af3df7 100644 --- a/qcsrc/common/monsters/spawn.qc +++ b/qcsrc/common/monsters/spawn.qc @@ -9,7 +9,7 @@ #include #endif entity spawnmonster (string monster, float monster_id, entity spawnedby, entity own, vector orig, float respwn, float invincible, float moveflag) -{SELFPARAM(); +{ float i; entity e = spawn(); diff --git a/qcsrc/common/mutators/mutator/bugrigs/bugrigs.qc b/qcsrc/common/mutators/mutator/bugrigs/bugrigs.qc index fa30be11c..0e7d5813e 100644 --- a/qcsrc/common/mutators/mutator/bugrigs/bugrigs.qc +++ b/qcsrc/common/mutators/mutator/bugrigs/bugrigs.qc @@ -284,7 +284,9 @@ MUTATOR_HOOKFUNCTION(bugrigs, PM_Physics) MUTATOR_HOOKFUNCTION(bugrigs, PlayerPhysics) { +#ifdef SVQC SELFPARAM(); +#endif if(!PHYS_BUGRIGS(self)) { return false; } #ifdef SVQC self.bugrigs_prevangles = self.angles; diff --git a/qcsrc/common/mutators/mutator/itemstime.qc b/qcsrc/common/mutators/mutator/itemstime.qc index f3612554d..e6599e614 100644 --- a/qcsrc/common/mutators/mutator/itemstime.qc +++ b/qcsrc/common/mutators/mutator/itemstime.qc @@ -149,7 +149,7 @@ float Item_ItemsTime_UpdateTime(entity e, float t) } MUTATOR_HOOKFUNCTION(itemstime, reset_map_global) -{SELFPARAM(); +{ Item_ItemsTime_ResetTimes(); // ALL the times need to be reset before .reset()ing each item // since Item_Reset schedules respawn of superweapons and powerups diff --git a/qcsrc/common/mutators/mutator/midair/midair.qc b/qcsrc/common/mutators/mutator/midair/midair.qc index 622572c36..c02642dab 100644 --- a/qcsrc/common/mutators/mutator/midair/midair.qc +++ b/qcsrc/common/mutators/mutator/midair/midair.qc @@ -7,7 +7,7 @@ REGISTER_MUTATOR(midair, cvar("g_midair")); .float midair_shieldtime; MUTATOR_HOOKFUNCTION(midair, PlayerDamage_Calculate) -{SELFPARAM(); +{ if(IS_PLAYER(frag_attacker)) if(IS_PLAYER(frag_target)) if(time < frag_target.midair_shieldtime) diff --git a/qcsrc/common/triggers/platforms.qc b/qcsrc/common/triggers/platforms.qc index c834a06a2..a2efc1142 100644 --- a/qcsrc/common/triggers/platforms.qc +++ b/qcsrc/common/triggers/platforms.qc @@ -1,6 +1,7 @@ void generic_plat_blocked() -{SELFPARAM(); +{ #ifdef SVQC + SELFPARAM(); if(self.dmg && other.takedamage != DAMAGE_NO) { if(self.dmgtime2 < time) diff --git a/qcsrc/common/triggers/subs.qh b/qcsrc/common/triggers/subs.qh index 19ccde9dc..aebda5d0a 100644 --- a/qcsrc/common/triggers/subs.qh +++ b/qcsrc/common/triggers/subs.qh @@ -29,7 +29,7 @@ .vector move_origin; void SUB_SETORIGIN(entity s, vector v) - {SELFPARAM(); + { s.move_origin = v; _Movetype_LinkEdict(s, true); } diff --git a/qcsrc/common/triggers/teleporters.qc b/qcsrc/common/triggers/teleporters.qc index 52324733f..afeabfcdd 100644 --- a/qcsrc/common/triggers/teleporters.qc +++ b/qcsrc/common/triggers/teleporters.qc @@ -68,7 +68,7 @@ void spawn_tdeath(vector v0, entity e, vector v) #endif void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angles, vector to_velocity, vector telefragmin, vector telefragmax, float tflags) -{SELFPARAM(); +{ entity telefragger; vector from; @@ -80,6 +80,7 @@ void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angle makevectors (to_angles); #ifdef SVQC + SELFPARAM(); if(player.teleportable == TELEPORT_NORMAL) // don't play sounds or show particles for anything that isn't a player, maybe change later to block only observers { if(self.pushltime < time) // only show one teleport effect per teleporter per 0.2 seconds, for better fps @@ -299,7 +300,7 @@ entity Teleport_Find(vector mi, vector ma) } void WarpZone_PostTeleportPlayer_Callback(entity pl) -{SELFPARAM(); +{ #ifdef SVQC makevectors(pl.angles); Reset_ArcBeam(pl, v_forward); diff --git a/qcsrc/common/vehicles/cl_vehicles.qc b/qcsrc/common/vehicles/cl_vehicles.qc index 72334b100..9a9b8b08b 100644 --- a/qcsrc/common/vehicles/cl_vehicles.qc +++ b/qcsrc/common/vehicles/cl_vehicles.qc @@ -294,7 +294,6 @@ void Vehicles_drawHUD( void Vehicles_drawCrosshair(string crosshair) { - SELFPARAM(); vector tmpSize = '0 0 0'; vector tmpPos = '0 0 0'; diff --git a/qcsrc/common/vehicles/vehicle/racer.qc b/qcsrc/common/vehicles/vehicle/racer.qc index 6d0a2b978..ce5e0043d 100644 --- a/qcsrc/common/vehicles/vehicle/racer.qc +++ b/qcsrc/common/vehicles/vehicle/racer.qc @@ -578,8 +578,8 @@ METHOD(Racer, vr_impact, void(Racer thisveh, entity instance)) METHOD(Racer, vr_enter, void(Racer thisveh, entity instance)) { - SELFPARAM(); #ifdef SVQC + SELFPARAM(); self.movetype = MOVETYPE_BOUNCE; self.owner.vehicle_health = (self.vehicle_health / autocvar_g_vehicle_racer_health) * 100; self.owner.vehicle_shield = (self.vehicle_shield / autocvar_g_vehicle_racer_shield) * 100; @@ -587,15 +587,15 @@ METHOD(Racer, vr_enter, void(Racer thisveh, entity instance)) if(self.owner.flagcarried) setorigin(self.owner.flagcarried, '-190 0 96'); #elif defined(CSQC) - + SELFPARAM(); self.move_movetype = MOVETYPE_BOUNCE; #endif } METHOD(Racer, vr_spawn, void(Racer thisveh, entity instance)) { - SELFPARAM(); #ifdef SVQC + SELFPARAM(); if(self.scale != 0.5) { if(autocvar_g_vehicle_racer_hovertype != 0) @@ -676,8 +676,8 @@ METHOD(Racer, vr_crosshair, void(Racer thisveh)) #endif METHOD(Racer, vr_setup, void(Racer thisveh, entity instance)) { - SELFPARAM(); #ifdef SVQC + SELFPARAM(); self.vehicle_exit = racer_exit; #endif diff --git a/qcsrc/common/vehicles/vehicle/racer_weapon.qc b/qcsrc/common/vehicles/vehicle/racer_weapon.qc index 6b9fd722b..85938cee7 100644 --- a/qcsrc/common/vehicles/vehicle/racer_weapon.qc +++ b/qcsrc/common/vehicles/vehicle/racer_weapon.qc @@ -84,7 +84,7 @@ void racer_rocket_tracker(); void racer_rocket_groundhugger(); void racer_fire_rocket(entity player, vector org, vector dir, entity trg) -{SELFPARAM(); +{ entity rocket = vehicles_projectile(EFFECT_RACER_ROCKETLAUNCH.eent_eff_name, SND_ROCKET_FIRE, org, dir * autocvar_g_vehicle_racer_rocket_speed, autocvar_g_vehicle_racer_rocket_damage, autocvar_g_vehicle_racer_rocket_radius, autocvar_g_vehicle_racer_rocket_force, 3, diff --git a/qcsrc/server/bot/havocbot/havocbot.qc b/qcsrc/server/bot/havocbot/havocbot.qc index 68ff899ea..a2e1372da 100644 --- a/qcsrc/server/bot/havocbot/havocbot.qc +++ b/qcsrc/server/bot/havocbot/havocbot.qc @@ -1270,7 +1270,7 @@ void havocbot_setupbot() } vector havocbot_dodge() -{SELFPARAM(); +{ // LordHavoc: disabled because this is too expensive return '0 0 0'; #if 0 diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index 6e43d9a7b..14965d8c7 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -321,7 +321,6 @@ void CommonCommand_cvar_purechanges(float request, entity caller) void CommonCommand_editmob(int request, entity caller, int argc) { - SELFPARAM(); switch (request) { case CMD_REQUEST_COMMAND: diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index 75f63b71f..e713caf79 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -220,7 +220,6 @@ void GameCommand_allspec(float request, float argc) void GameCommand_anticheat(float request, float argc) { - SELFPARAM(); switch (request) { case CMD_REQUEST_COMMAND: diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index c59e8a4bf..4814c4080 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -754,7 +754,7 @@ void precache_playermodels(string s) } void precache() -{SELFPARAM(); +{ // gamemode related things // Precache all player models if desired diff --git a/qcsrc/server/mutators/mutator/gamemode_ctf.qc b/qcsrc/server/mutators/mutator/gamemode_ctf.qc index fc2bf49d8..a29e3d55a 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ctf.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qc @@ -1187,7 +1187,7 @@ void ctf_DelayedFlagSetup() // called after a flag is placed on a map by ctf_Fla .bool pushable; void ctf_FlagSetup(int teamnumber, entity flag) // called when spawning a flag entity on the map as a spawnfunc -{SELFPARAM(); +{ // declarations setself(flag); // for later usage with droptofloor() diff --git a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc index 4d7b8c9f9..5bc82f196 100644 --- a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc @@ -365,13 +365,13 @@ void ft_RemovePlayer() } MUTATOR_HOOKFUNCTION(ft, ClientDisconnect) -{SELFPARAM(); +{ ft_RemovePlayer(); return 1; } MUTATOR_HOOKFUNCTION(ft, MakePlayerObserver) -{SELFPARAM(); +{ ft_RemovePlayer(); return false; } @@ -455,7 +455,7 @@ MUTATOR_HOOKFUNCTION(ft, PlayerSpawn) } MUTATOR_HOOKFUNCTION(ft, reset_map_players) -{SELFPARAM(); +{ FOREACH_CLIENT(IS_PLAYER(it), LAMBDA( it.killcount = 0; it.freezetag_frozen_timeout = -1; diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index c94ff92d9..ad1b4588e 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -156,7 +156,6 @@ bool autocvar_sv_autopause = true; float RedirectionThink(); void StartFrame() { - SELFPARAM(); execute_next_frame(); if (autocvar_sv_autopause && !server_is_dedicated) Pause_TryPause(true);