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)
{
{
// 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;
}
{
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;
}
}
}
-void checkpoint_touch()
-{SELFPARAM();
+void checkpoint_touch(entity this)
+{
EXACTTRIGGER_TOUCH;
checkpoint_passed(this, other);
}
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)
this.use = checkpoint_use;
if (!(this.spawnflags & 1))
- this.touch = checkpoint_touch;
+ settouch(this, checkpoint_touch);
o = (this.absmin + this.absmax) * 0.5;
tracebox(o, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), o - '0 0 1' * (o.z - this.absmin.z), MOVE_NORMAL, this);
this.use = checkpoint_use;
if (!(this.spawnflags & 1))
- this.touch = checkpoint_touch;
+ settouch(this, checkpoint_touch);
o = (this.absmin + this.absmax) * 0.5;
tracebox(o, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), o - '0 0 1' * (o.z - this.absmin.z), MOVE_NORMAL, this);
}
void race_ClearRecords()
-{SELFPARAM();
+{
float i;
for(i = 0; i < MAX_CHECKPOINTS; ++i)
}
}
-void penalty_touch()
-{SELFPARAM();
+void penalty_touch(entity this)
+{
EXACTTRIGGER_TOUCH;
- if(other.race_lastpenalty != self)
+ if(other.race_lastpenalty != this)
{
- other.race_lastpenalty = self;
- race_ImposePenaltyTime(other, self.race_penalty, self.race_penalty_reason);
+ other.race_lastpenalty = this;
+ race_ImposePenaltyTime(other, this.race_penalty, this.race_penalty_reason);
}
}
this.use = penalty_use;
if (!(this.spawnflags & 1))
- this.touch = penalty_touch;
+ settouch(this, penalty_touch);
if (this.race_penalty_reason == "")
this.race_penalty_reason = "missing a checkpoint";