]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/race.qc
Merge branch 'terencehill/hud_smooth_weapon_switch' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / race.qc
index 67e9d73eecb6ba5e3e9b283634b4ee3ec75f31df..6fc5cf712a1cdd572d091781a74f5228ac34a0f0 100644 (file)
@@ -22,7 +22,7 @@ void race_InitSpectator()
                        race_SendNextCheckpoint(msg_entity.enemy, 1);
 }
 
-void W_Porto_Fail(float failhard);
+void W_Porto_Fail(entity this, float failhard);
 
 float race_readTime(string map, float pos)
 {
@@ -570,7 +570,7 @@ void checkpoint_passed(entity this, entity player)
        {
                // do not allow portalling through checkpoints
                trace_plane_normal = normalize(-1 * player.velocity);
-               WITHSELF(player, W_Porto_Fail(0));
+               W_Porto_Fail(player, 0);
                return;
        }
 
@@ -581,7 +581,7 @@ void checkpoint_passed(entity this, entity player)
        {
                oldmsg = this.message;
                this.message = "";
-               SUB_UseTargets(this, player, player); // TODO: should we be using other for the trigger here?
+               SUB_UseTargets(this, player, player);
                this.message = oldmsg;
        }
 
@@ -698,8 +698,8 @@ void checkpoint_passed(entity this, entity player)
        }
 }
 
-void checkpoint_touch()
-{SELFPARAM();
+void checkpoint_touch(entity this)
+{
        EXACTTRIGGER_TOUCH;
        checkpoint_passed(this, other);
 }
@@ -709,8 +709,7 @@ void checkpoint_use(entity this, entity actor, entity trigger)
        if(trigger.classname == "info_player_deathmatch") // a spawn, a spawn
                return;
 
-       other = actor;
-       checkpoint_passed(this, other);
+       checkpoint_passed(this, actor);
 }
 
 bool race_waypointsprite_visible_for_player(entity this, entity player, entity view)
@@ -1093,8 +1092,8 @@ void race_ImposePenaltyTime(entity pl, float penalty, string reason)
        }
 }
 
-void penalty_touch()
-{SELFPARAM();
+void penalty_touch(entity this)
+{
        EXACTTRIGGER_TOUCH;
        if(other.race_lastpenalty != this)
        {