Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve warmup handling, allow it to be disabled #322

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions cfg/sourcemod/retakes/retakes_game.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ bot_kick
bot_quota 0
cash_team_bonus_shorthanded 0
mp_autoteambalance 0
mp_do_warmup_period 1
mp_forcecamera 1
mp_give_player_c4 0
mp_halftime 0
Expand All @@ -16,7 +15,6 @@ mp_respawn_on_death_ct 0
mp_respawn_on_death_t 0
mp_solid_teammates 1
mp_teamcashawards 0
mp_warmup_pausetimer 0
mp_molotovusedelay 0

// Things you can change, and may want to:
Expand Down
4 changes: 3 additions & 1 deletion scripting/retakes.sp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,9 @@ public void OnMapStart() {
ExecConfigs();

// Restart warmup for players to connect.
StartTimedWarmup(g_WarmupTimeCvar.IntValue);
if (g_WarmupTimeCvar.IntValue > 0) {
StartTimedWarmup(g_WarmupTimeCvar.IntValue);
}
}

public void OnMapEnd() {
Expand Down
5 changes: 5 additions & 0 deletions scripting/retakes/generic.sp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ stock void StartPausedWarmup() {
}

stock void StartTimedWarmup(int time) {
// avoid infinite warmup start spam
if (time < 6) {
time = 6;
}

ServerCommand("mp_do_warmup_period 1");
ServerCommand("mp_warmup_pausetimer 0");
ServerCommand("mp_warmuptime %d", time);
Expand Down