// Resets the state of all clients, items, weapons, waypoints, ... of the map.
void reset_map(bool dorespawn)
{
- SELFPARAM();
-
if (time <= game_starttime && round_handler_IsActive()) round_handler_Reset(game_starttime);
MUTATOR_CALLHOOK(reset_map_global);
// Waypoints and assault start come LAST
FOREACH_ENTITY_ORDERED(IS_NOT_A_CLIENT(it), {
- if (it.reset2) WITHSELF(it, it.reset2());
+ if (it.reset2) it.reset2(it);
});
FOREACH_CLIENT(IS_PLAYER(it) && STAT(FROZEN, it), LAMBDA(WITHSELF(it, Unfreeze(it))));
}
// Restarts the map after the countdown is over (and cvar sv_ready_restart_after_countdown is set)
-void ReadyRestart_think()
+void ReadyRestart_think(entity this)
{
- SELFPARAM();
restart_mapalreadyrestarted = true;
reset_map(true);
Score_ClearAll();
if (autocvar_sv_ready_restart_after_countdown)
{
entity restart_timer = new_pure(restart_timer);
- restart_timer.think = ReadyRestart_think;
+ setthink(restart_timer, ReadyRestart_think);
restart_timer.nextthink = game_starttime;
}