]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator/gamemode_keepaway.qc
Merge branch 'terencehill/v_deathtilt_fix' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator / gamemode_keepaway.qc
index b6d3ca3c0ca2d6f8f58fabec4ef683b1c3cf49f6..22ae10f7c46810c17120a9ef73ba3b72ea61ca8e 100644 (file)
@@ -81,7 +81,8 @@ void ka_EventLog(string mode, entity actor) // use an alias for easy changing an
                GameLogEcho(strcat(":ka:", mode, ((actor != world) ? (strcat(":", ftos(actor.playerid))) : "")));
 }
 
-void ka_TouchEvent();
+void ka_TouchEvent(entity this);
+void ka_RespawnBall(entity this);
 void ka_RespawnBall(entity this) // runs whenever the ball needs to be relocated
 {
        if(gameover) { return; }
@@ -112,8 +113,8 @@ void ka_RespawnBall(entity this) // runs whenever the ball needs to be relocated
        sound(self, CH_TRIGGER, SND_KA_RESPAWN, VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere)
 }
 
-void ka_TimeScoring()
-{SELFPARAM();
+void ka_TimeScoring(entity this)
+{
        if(self.owner.ballcarried)
        { // add points for holding the ball after a certain amount of time
                if(autocvar_g_keepaway_score_timepoints)
@@ -124,8 +125,8 @@ void ka_TimeScoring()
        }
 }
 
-void ka_TouchEvent() // runs any time that the ball comes in contact with something
-{SELFPARAM();
+void ka_TouchEvent(entity this) // runs any time that the ball comes in contact with something
+{
        if(gameover) { return; }
        if(!self) { return; }
        if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
@@ -154,7 +155,7 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth
        self.movetype = MOVETYPE_NONE;
        self.effects |= EF_NODRAW;
        settouch(self, func_null);
-       self.think = ka_TimeScoring;
+       setthink(self, ka_TimeScoring);
        self.nextthink = time + autocvar_g_keepaway_score_timeinterval;
        self.takedamage = DAMAGE_NO;