]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
Clean out some waypoint sprite SELFPARAMs
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index 903d1de255e0d1a34ab31d568ee78c410a4ac06d..d826c2a35f7e72c9b949cca84b549824f58ee80a 100644 (file)
@@ -851,8 +851,8 @@ void KillIndicator_Think(entity this)
 }
 
 float clientkilltime;
-void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto, -2 = spec
-{SELFPARAM();
+void ClientKill_TeamChange (entity this, float targetteam) // 0 = don't change, -1 = auto, -2 = spec
+{
        float killtime;
        float starttime;
        entity e;
@@ -880,7 +880,7 @@ void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto, -2
 
                if(killtime <= 0 || !IS_PLAYER(this) || IS_DEAD(this))
                {
-                       ClientKill_Now();
+                       WITHSELF(this, ClientKill_Now());
                }
                else
                {
@@ -955,7 +955,7 @@ void ClientKill ()
        if(this.player_blocked) return;
        if(STAT(FROZEN, this)) return;
 
-       ClientKill_TeamChange(0);
+       ClientKill_TeamChange(this, 0);
 }
 
 void FixClientCvars(entity e)
@@ -1208,7 +1208,7 @@ void ClientDisconnect()
        if (this.chatbubbleentity) remove(this.chatbubbleentity);
        if (this.killindicator) remove(this.killindicator);
 
-       WaypointSprite_PlayerGone();
+       WaypointSprite_PlayerGone(this);
 
        bot_relinkplayerlist();
 
@@ -1551,10 +1551,9 @@ void SetZoomState(float z)
        zoomstate_set = true;
 }
 
-void GetPressedKeys()
+void GetPressedKeys(entity this)
 {
-       SELFPARAM();
-       MUTATOR_CALLHOOK(GetPressedKeys);
+       MUTATOR_CALLHOOK(GetPressedKeys, this);
        int keys = this.pressedkeys;
        keys = BITSET(keys, KEY_FORWARD,        this.movement.x > 0);
        keys = BITSET(keys, KEY_BACKWARD,       this.movement.x < 0);
@@ -1698,7 +1697,7 @@ bool Spectate(entity pl)
 {SELFPARAM();
        if(MUTATOR_CALLHOOK(SpectateSet, this, pl))
                return false;
-       pl = spec_player;
+       pl = M_ARGV(1, entity);
 
        SetSpectatee(this, pl);
        return SpectateSet();
@@ -1709,7 +1708,7 @@ bool SpectateNext()
        other = find(this.enemy, classname, STR_PLAYER);
 
        if (MUTATOR_CALLHOOK(SpectateNext, this, other))
-               other = spec_player;
+               other = M_ARGV(1, entity);
        else if (!other)
                other = find(other, classname, STR_PLAYER);
 
@@ -1734,10 +1733,10 @@ bool SpectatePrev()
        switch (MUTATOR_CALLHOOK(SpectatePrev, this, other, first))
        {
                case MUT_SPECPREV_FOUND:
-                   other = spec_player;
+                   other = M_ARGV(1, entity);
                    break;
                case MUT_SPECPREV_RETURN:
-                   other = spec_player;
+                   other = M_ARGV(1, entity);
                    return true;
                case MUT_SPECPREV_CONTINUE:
                default:
@@ -2052,7 +2051,7 @@ void PlayerUseKey()
        }
 
        // a use key was pressed; call handlers
-       MUTATOR_CALLHOOK(PlayerUseKey);
+       MUTATOR_CALLHOOK(PlayerUseKey, this);
 }
 
 
@@ -2153,7 +2152,7 @@ void PlayerPreThink ()
                        Unfreeze(this);
        }
 
-       MUTATOR_CALLHOOK(PlayerPreThink);
+       MUTATOR_CALLHOOK(PlayerPreThink, this);
 
        if(autocvar_g_vehicles_enter)
        if(time > this.last_vehiclecheck)
@@ -2462,7 +2461,7 @@ void PlayerPostThink ()
                UpdateChatBubble();
                if (this.impulse) ImpulseCommands(this);
                if (intermission_running) return; // intermission or finale
-               GetPressedKeys();
+               GetPressedKeys(this);
        }
 
        if (this.waypointsprite_attachedforcarrier) {