IL_PUSH(g_kaballs, e);
navigation_dynamicgoal_init(e, false);
- InitializeEntity(e, ka_RespawnBall, INITPRIO_SETLOCATION); // is this the right priority? Neh, I have no idea.. Well-- it works! So.
+ ka_RespawnBall(e);
}
void ka_SpawnBalls(int ballcount)
this.nextthink = time;
}
-void ka_Initialize() // run at the start of a match, initiates game mode
-{
- g_kaballs = IL_NEW();
- ka_Handler = new_pure(ka_Handler);
- setthink(ka_Handler, ka_Handler_CheckBall);
- ka_Handler.nextthink = time;
-}
-
// ================
// Bot player logic
#include <common/mutators/base.qh>
#include <common/scores.qh>
-void ka_Initialize();
+
+void ka_Handler_CheckBall(entity this);
IntrusiveList g_kaballs;
REGISTER_MUTATOR(ka, false)
field(SP_KEEPAWAY_BCTIME, "bctime", SFL_SORT_PRIO_SECONDARY);
});
- ka_Initialize();
+ g_kaballs = IL_NEW();
+ entity ka_Handler = new_pure(ka_Handler);
+ setthink(ka_Handler, ka_Handler_CheckBall);
+ InitializeEntity(ka_Handler, ka_Handler_CheckBall, INITPRIO_SETLOCATION);
}
return false;
}
const int KA_BALL_COUNT = 1;
-entity ka_Handler;
-
void(entity this) havocbot_role_ka_carrier;
void(entity this) havocbot_role_ka_collector;