CLASS(Player, Client)
INIT(Player) {
this.classname = STR_PLAYER;
+ IL_PUSH(g_players, this);
+ }
+ DESTRUCTOR(Player) {
+ IL_REMOVE(g_players, this);
}
- DESTRUCTOR(Player) { }
ENDCLASS(Player)
METHOD(Client, m_unwind, bool(Client this))
IntrusiveList g_spawnpoints;
STATIC_INIT(g_spawnpoints) { g_spawnpoints = IL_NEW(); }
+
+IntrusiveList g_players;
+STATIC_INIT(g_players) { g_players = IL_NEW(); }
void StartFrame()
{
// TODO: if move is more than 50ms, split it into two moves (this matches QWSV behavior and the client prediction)
- FOREACH_ENTITY_CLASS(STR_PLAYER, IS_FAKE_CLIENT(it), sys_phys_update(it, frametime));
- FOREACH_ENTITY_CLASS(STR_PLAYER, IS_FAKE_CLIENT(it), PlayerPreThink(it));
+ IL_EACH(g_players, IS_FAKE_CLIENT(it), sys_phys_update(it, frametime));
+ IL_EACH(g_players, IS_FAKE_CLIENT(it), PlayerPreThink(it));
execute_next_frame();
if (autocvar_sv_autopause && !server_is_dedicated) Pause_TryPause(true);
MUTATOR_CALLHOOK(SV_StartFrame);
FOREACH_CLIENT(true, GlobalStats_update(it));
- FOREACH_ENTITY_CLASS(STR_PLAYER, IS_FAKE_CLIENT(it), PlayerPostThink(it));
+ IL_EACH(g_players, IS_FAKE_CLIENT(it), PlayerPostThink(it));
}
.vector originjitter;