#include "../common/mutators/mutator/waypoints/waypointsprites.qh"
IntrusiveList g_race_targets;
-STATIC_INIT(g_race_targets) { g_race_targets = IL_NEW(); }
+IntrusiveList g_racecheckpoints;
+STATIC_INIT(g_race)
+{
+ g_race_targets = IL_NEW();
+ g_racecheckpoints = IL_NEW();
+}
void race_InitSpectator()
{
void checkpoint_passed(entity this, entity player)
{
+ if(IS_VEHICLE(player) && player.owner)
+ player = player.owner;
+
if(player.personal && autocvar_g_allow_checkpoints)
return; // practice mode!
void checkpoint_touch(entity this, entity toucher)
{
EXACTTRIGGER_TOUCH(this, toucher);
- if(IS_VEHICLE(toucher) && toucher.owner)
- toucher = toucher.owner;
checkpoint_passed(this, toucher);
}
if(trigger.classname == "info_player_deathmatch") // a spawn, a spawn
return;
- if(IS_VEHICLE(actor) && actor.owner)
- actor = actor.owner;
checkpoint_passed(this, actor);
}