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)
{
}
else // RACE! Not Qualifying
{
- float lself, lother, othtime;
+ float mylaps, lother, othtime;
entity oth;
oth = race_checkpoint_lastplayers[cp];
if(oth)
{
- lself = PlayerScore_Add(e, SP_RACE_LAPS, 0);
+ mylaps = PlayerScore_Add(e, SP_RACE_LAPS, 0);
lother = race_checkpoint_lastlaps[cp];
othtime = race_checkpoint_lasttimes[cp];
}
else
- lself = lother = othtime = 0;
+ mylaps = lother = othtime = 0;
if(IS_REAL_CLIENT(e))
{
else
{
WriteInt24_t(MSG_ONE, TIME_ENCODE(time - race_checkpoint_lasttimes[cp]));
- WriteByte(MSG_ONE, lself - lother);
+ WriteByte(MSG_ONE, mylaps - lother);
WriteString(MSG_ONE, oth.netname); // record holder
}
});
race_checkpoint_lastplayers[cp] = e;
race_checkpoint_lasttimes[cp] = time;
- race_checkpoint_lastlaps[cp] = lself;
+ race_checkpoint_lastlaps[cp] = mylaps;
if(IS_REAL_CLIENT(oth))
{
else
{
WriteInt24_t(MSG_ONE, TIME_ENCODE(time - othtime));
- WriteByte(MSG_ONE, lother - lself);
+ WriteByte(MSG_ONE, lother - mylaps);
WriteString(MSG_ONE, e.netname); // record holder
}
});
{
// 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;
}
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)