#include <common/scores.qh>
void ka_Initialize();
+IntrusiveList g_kaballs;
REGISTER_MUTATOR(ka, false)
{
MUTATOR_STATIC();
entity ka_Handler;
-IntrusiveList g_kaballs;
-STATIC_INIT(g_kaballs) { g_kaballs = IL_NEW(); }
-
void(entity this) havocbot_role_ka_carrier;
void(entity this) havocbot_role_ka_collector;
IntrusiveList g_race_targets;
IntrusiveList g_racecheckpoints;
-STATIC_INIT(g_race)
-{
- g_race_targets = IL_NEW();
- g_racecheckpoints = IL_NEW();
-}
void race_InitSpectator()
{
this.sprite.waypointsprite_visible_for_player = race_waypointsprite_visible_for_player;
this.spawn_evalfunc = trigger_race_checkpoint_spawn_evalfunc;
+ if (!g_racecheckpoints)
+ g_racecheckpoints = IL_NEW();
IL_PUSH(g_racecheckpoints, this);
+ // trigger_race_checkpoint_verify checks this list too
+ if (!g_race_targets)
+ g_race_targets = IL_NEW();
+
InitializeEntity(this, trigger_race_checkpoint_verify, INITPRIO_FINDTARGET);
}
race_timed_checkpoint = 1;
+ if (!g_race_targets)
+ g_race_targets = IL_NEW();
IL_PUSH(g_race_targets, this);
+ // trigger_race_checkpoint_verify checks this list too
+ if (!g_racecheckpoints)
+ g_racecheckpoints = IL_NEW();
+
InitializeEntity(this, trigger_race_checkpoint_verify, INITPRIO_FINDTARGET);
}