FOR_EACH_REALCLIENT(e)
centerprint(e, "Round over, there's no winner");
bprint("Round over, there's no winner\n");
+ round_handler_Init(5, autocvar_g_arena_warmup, autocvar_g_arena_round_timelimit);
return 1;
}
centerprint(e, "Round tied");
bprint("Round tied\n");
}
+ round_handler_Init(5, autocvar_g_arena_warmup, autocvar_g_arena_round_timelimit);
return 1;
}
maxspawned = max(2, autocvar_g_arena_maxspawned);
arena_roundbased = autocvar_g_arena_roundbased;
if(arena_roundbased)
- round_handler_Spawn(Arena_CheckPlayers, Arena_CheckWinner, Arena_RoundStart, 5, autocvar_g_arena_warmup, autocvar_g_arena_round_timelimit);
+ {
+ round_handler_Spawn(Arena_CheckPlayers, Arena_CheckWinner, Arena_RoundStart);
+ round_handler_Init(5, autocvar_g_arena_warmup, autocvar_g_arena_round_timelimit);
+ }
}
MUTATOR_DEFINITION(gamemode_arena)
centerprint(e, "Round over, there's no winner");
bprint("Round over, there's no winner.\n");
allowed_to_spawn = FALSE;
+ round_handler_Init(5, autocvar_g_ca_warmup, autocvar_g_ca_round_timelimit);
return 1;
}
}
allowed_to_spawn = FALSE;
+ round_handler_Init(5, autocvar_g_ca_warmup, autocvar_g_ca_round_timelimit);
return 1;
}
{
allowed_to_spawn = TRUE;
- round_handler_Spawn(CA_CheckTeams, CA_CheckWinner, CA_RoundStart, 5, autocvar_g_ca_warmup, autocvar_g_ca_round_timelimit);
+ round_handler_Spawn(CA_CheckTeams, CA_CheckWinner, CA_RoundStart);
+ round_handler_Init(5, autocvar_g_ca_warmup, autocvar_g_ca_round_timelimit);
addstat(STAT_REDALIVE, AS_INT, redalive_stat);
addstat(STAT_BLUEALIVE, AS_INT, bluealive_stat);
precache_model("models/ice/ice.md3");
ScoreRules_freezetag();
- round_handler_Spawn(freezetag_CheckTeams, freezetag_CheckWinner, func_null, 5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
+ round_handler_Spawn(freezetag_CheckTeams, freezetag_CheckWinner, func_null);
+ round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
addstat(STAT_REDALIVE, AS_INT, redalive_stat);
addstat(STAT_BLUEALIVE, AS_INT, bluealive_stat);
bprint("Round over, there's no winner.\n");
FOR_EACH_PLAYER(e)
e.freezetag_frozen_timeout = 0;
+ round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
return 1;
}
FOR_EACH_PLAYER(e)
e.freezetag_frozen_timeout = 0;
+ round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
return 1;
}
}
}
-void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, void() roundStart_func, float the_delay, float the_count, float the_round_timelimit)
+void round_handler_Init(float the_delay, float the_count, float the_round_timelimit)
+{
+ round_handler.delay = (the_delay > 0) ? the_delay : 0;
+ round_handler.count = fabs(floor(the_count));
+ round_handler.round_timelimit = max(10, the_round_timelimit);
+}
+
+void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, void() roundStart_func)
{
if(round_handler)
{
round_handler.canRoundStart = canRoundStart_func;
round_handler.canRoundEnd = canRoundEnd_func;
round_handler.roundStart = roundStart_func;
- round_handler.delay = (the_delay > 0) ? the_delay : 0;
- round_handler.count = fabs(floor(the_count));
round_handler.wait = FALSE;
+ round_handler_Init(5, 5, 180);
round_handler.cnt = round_handler.count + 1;
- round_handler.round_timelimit = the_round_timelimit;
// if round_handler spawns at time 1 gamestarttime isn't initialized yet
//round_handler.nextthink = max(time, game_starttime + 1);
round_handler.nextthink = time;
.float() canRoundEnd;
.void() roundStart;
-void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, void() roundStart_func, float the_delay, float the_count, float the_round_timelimit);
+void round_handler_Init(float the_delay, float the_count, float the_round_timelimit);
+void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, void() roundStart_func);
float round_handler_IsActive();
float round_handler_AwaitingNextRound();
float round_handler_CountdownRunning();