// race only (middle of the race)
g_race_qualifying = false;
pl_race_place = 0;
- if (!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), 0, false)) {
+ if (!Spawn_FilterOutBadSpots(this, findchain(classname, "info_player_deathmatch"), 0, false)) {
error(strcat("Checkpoint ", ftos(i), " misses a spawnpoint with race_place==", ftos(pl_race_place), " (used for respawning in race) - bailing out"));
}
// qualifying only
g_race_qualifying = 1;
pl_race_place = race_lowest_place_spawn;
- if (!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), 0, false)) {
+ if (!Spawn_FilterOutBadSpots(this, findchain(classname, "info_player_deathmatch"), 0, false)) {
error(strcat("Checkpoint ", ftos(i), " misses a spawnpoint with race_place==", ftos(pl_race_place), " (used for qualifying) - bailing out"));
}
g_race_qualifying = 0;
for (int p = 1; p <= race_highest_place_spawn; ++p) {
pl_race_place = p;
- if (!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), 0, false)) {
+ if (!Spawn_FilterOutBadSpots(this, findchain(classname, "info_player_deathmatch"), 0, false)) {
error(strcat("Checkpoint ", ftos(i), " misses a spawnpoint with race_place==", ftos(pl_race_place), " (used for initially spawning in race) - bailing out"));
}
}
pl_race_checkpoint = race_NextCheckpoint(0);
g_race_qualifying = 1;
pl_race_place = race_lowest_place_spawn;
- if (!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), 0, false)) {
+ if (!Spawn_FilterOutBadSpots(this, findchain(classname, "info_player_deathmatch"), 0, false)) {
error(strcat("Checkpoint 0 misses a spawnpoint with race_place==", ftos(pl_race_place), " (used for qualifying) - bailing out"));
}
} else {
}
}
-vector trigger_race_checkpoint_spawn_evalfunc(entity player, entity spot, vector current)
-{SELFPARAM();
+vector trigger_race_checkpoint_spawn_evalfunc(entity this, entity player, entity spot, vector current)
+{
if(g_race_qualifying)
{
// spawn at first
- if(self.race_checkpoint != 0)
+ if(this.race_checkpoint != 0)
return '-1 0 0';
if(spot.race_place != race_lowest_place_spawn)
return '-1 0 0';
}
else
{
- if(self.race_checkpoint != player.race_respawn_checkpoint)
+ if(this.race_checkpoint != player.race_respawn_checkpoint)
return '-1 0 0';
// try reusing the previous spawn
- if(self == player.race_respawn_spotref || spot == player.race_respawn_spotref)
+ if(this == player.race_respawn_spotref || spot == player.race_respawn_spotref)
current.x += SPAWN_PRIO_RACE_PREVIOUS_SPAWN;
- if(self.race_checkpoint == 0)
+ if(this.race_checkpoint == 0)
{
- float pl;
- pl = player.race_place;
+ int pl = player.race_place;
if(pl > race_highest_place_spawn)
pl = 0;
if(pl == 0 && !player.race_started)