From: terencehill Date: Fri, 2 Feb 2018 14:07:27 +0000 (+0100) Subject: For consistency move the remaining sv_ready_restart* cvars into readlevelcvars X-Git-Tag: xonotic-v0.8.5~2339^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bac65e0029d745e343b1a774cd3399f2a99153c3;p=xonotic%2Fxonotic-data.pk3dir.git For consistency move the remaining sv_ready_restart* cvars into readlevelcvars --- diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 664c307c8..847573135 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -324,8 +324,6 @@ string autocvar_sv_motd; bool autocvar_sv_precacheplayermodels; //float autocvar_sv_precacheweapons; // WEAPONTODO? bool autocvar_sv_q3acompat_machineshotgunswap; -bool autocvar_sv_ready_restart; -bool autocvar_sv_ready_restart_repeatable; bool autocvar_sv_servermodelsonly; int autocvar_sv_spectate; float autocvar_sv_spectator_speed_multiplier; diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 09a308ad5..088925f10 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -239,9 +239,9 @@ void ClientCommand_ready(entity caller, float request) // todo: anti-spam for t { if (IS_CLIENT(caller)) { - if (warmup_stage || autocvar_sv_ready_restart || g_race_qualifying == 2) + if (warmup_stage || sv_ready_restart || g_race_qualifying == 2) { - if (!readyrestart_happened || autocvar_sv_ready_restart_repeatable) + if (!readyrestart_happened || sv_ready_restart_repeatable) { if (time < game_starttime) // game is already restarting return; diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index e9cf6ee28..df94c7781 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -13,6 +13,10 @@ float g_warmup_allow_timeout; float warmup_stage; float g_jetpack; +bool sv_ready_restart; +bool sv_ready_restart_after_countdown; +bool sv_ready_restart_repeatable; + float sv_clones; float sv_foginterval; diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index 34f7d6080..8a32b9b5b 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -210,7 +210,6 @@ float warmup_start_ammo_fuel; float warmup_start_health; float warmup_start_armorvalue; float g_weapon_stay; -bool sv_ready_restart_after_countdown; float want_weapon(entity weaponinfo, float allguns); // WEAPONTODO: what still needs done? void readplayerstartcvars(); @@ -236,7 +235,9 @@ void readlevelcvars() sv_maxidle_slots_countbots = cvar("sv_maxidle_slots_countbots"); sv_autotaunt = cvar("sv_autotaunt"); sv_taunt = cvar("sv_taunt"); + sv_ready_restart = cvar("sv_ready_restart"); sv_ready_restart_after_countdown = cvar("sv_ready_restart_after_countdown"); + sv_ready_restart_repeatable = cvar("sv_ready_restart_repeatable"); warmup_stage = cvar("g_warmup"); warmup_limit = cvar("g_warmup_limit");