]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Delete unused SELFPARAM
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 22 May 2016 04:13:07 +0000 (14:13 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 22 May 2016 04:13:07 +0000 (14:13 +1000)
20 files changed:
qcsrc/client/shownames.qc
qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc
qcsrc/common/minigames/sv_minigames.qc
qcsrc/common/mutators/mutator/superspec/superspec.qc
qcsrc/common/triggers/subs.qc
qcsrc/common/triggers/target/music.qc
qcsrc/common/weapons/all.qh
qcsrc/common/weapons/weapon/blaster.qc
qcsrc/common/weapons/weapon/hook.qc
qcsrc/common/weapons/weapon/porto.qc
qcsrc/lib/self.qh
qcsrc/lib/warpzone/server.qc
qcsrc/server/cl_client.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/g_world.qc
qcsrc/server/mutators/mutator/gamemode_assault.qc
qcsrc/server/mutators/mutator/gamemode_freezetag.qc
qcsrc/server/race.qc
qcsrc/server/weapons/weaponsystem.qc

index 5368cb6429177ef4130a10e45610596485cab269..47e98d6194dee3a391a4fc2e48a43568d5c1d5b9 100644 (file)
@@ -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);
index d2e85cf68734ccd6aa5746566de67b7f20a74f44..b2d0a84d3af40d470138d347922f31bfe2828c75 100644 (file)
@@ -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';
index fe10459ff2d4e920d5ffc06db9e78e451f265890..18e1d3216ee38e14ae103df2720b96a9773dc405 100644 (file)
@@ -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 )
index b3f39dc3d8f075edd102d71c19d12000e8b1dbfd..adcc3b2d709fa666decca029cc0a983cedd4e127 100644 (file)
@@ -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)
                {
index c202d7125064e3931741cc3fc12958c83bcee3ac..99dc5217d274f64a2b30d875e4661d0bb8e76ba5 100644 (file)
@@ -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));
 }
index cbc584d863e2316335c19a14317258c174e690a0..b67d47d321418b19576fd6c3e6ec0b19b34787cc 100644 (file)
@@ -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 == "")
index 9b9046aa4c668b126bb023f9ff157517f5b3d3c3..95b7225cc680c95350b49fe92d32deb31143e045 100644 (file)
@@ -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)());
 }
index 6bb741b0db5b4cd45586238bbf78a45e539c8a65..24d532934d38ceaec6f2c409b3113cf2299b5d3b 100644 (file)
@@ -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);
index 468c64b9a696498da5108ce753e2482a0adb6e15..206223d011889e967253bcdc69abc308781a0cc5 100644 (file)
@@ -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;
index 00aa0153cb435e77e1dabace633e3fbd9f3405dd..60d2a8b70a778425de4503357cdc9898bf6a4e93 100644 (file)
@@ -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));
index 092a8945b7a25faf0286cef3a7234c315b837772..d028bc28fd370c653ee672d919385aec925dc45f 100644 (file)
@@ -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
index 8bd5d692ff8fa26df65a25c1c58f9b9e8eab5ab2..97abe0e6d14f4e9c9f833d5ad504d71463e6e902 100644 (file)
@@ -838,7 +838,6 @@ void WarpZone_Think()
 
 void WarpZone_StartFrame()
 {
-       SELFPARAM();
        if (!warpzone_initialized)
        {
                warpzone_initialized = true;
index d446322b38c7e67bbc5d951816c271f4982dd056..7ba3ed5359ccb0f0997d0e50e7bcdc08d026c76b 100644 (file)
@@ -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);
index e601bfc6ca184b458bd6bddd0dba0144eab09a94..3cea4fcc7cf4b43708dbeb5b86a5a3c21e143e81 100644 (file)
@@ -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:
index e19ef52e87dbef2d05ca7d5a5fc0ec96cd3e43f6..c07d570485d27078385e421bb6b16aa9ac1aa5f2 100644 (file)
@@ -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);
index 583391d22f1e4989f54bdce502d072ecf36b06f9..91f8ec5014a82eb4c1b450d0414ff3ca735fbed9 100644 (file)
@@ -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 == "")
index d961fa14d7f6b601c816b276809491c4334d58d8..b1d3857b4ba8692966038826ce473ae501b4dbde 100644 (file)
@@ -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;
index 990049728268700ab1c6d71296202752bcde872a..5e11666b856d5163bcd1f5e6b3a228ab55a2c53d 100644 (file)
@@ -375,7 +375,6 @@ MUTATOR_HOOKFUNCTION(ft, MakePlayerObserver)
 
 MUTATOR_HOOKFUNCTION(ft, PlayerDies)
 {
-    SELFPARAM();
        if(round_handler_IsActive())
        if(round_handler_CountdownRunning())
        {
index bb956105182f28c725f98912c428cf9ebd117106..f2315035f7d5764e5f60f91fb45e62e30a10ac53 100644 (file)
@@ -1043,7 +1043,7 @@ spawnfunc(info_player_race)
 }
 
 void race_ClearRecords()
-{SELFPARAM();
+{
        float i;
 
        for(i = 0; i < MAX_CHECKPOINTS; ++i)
index db5f9fe9013e4c827c3eed571c560d235556bd88..b7c81925f4d9a2407c1a85ea1cd8d9fd5d3c923b 100644 (file)
@@ -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);