From: terencehill Date: Tue, 24 May 2011 19:44:35 +0000 (+0200) Subject: Also replace cvar_scr_centertime with cvar_hud_panel_centerprint_time X-Git-Tag: xonotic-v0.5.0~217 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3bdf18befac3f24188764030556ca6bc6f228cb4;p=xonotic%2Fxonotic-data.pk3dir.git Also replace cvar_scr_centertime with cvar_hud_panel_centerprint_time However, the engine's cvar scr_centertime that refers to the builtin centerprint cannot be removed therefore it may lead to confusion. Maybe it can be avoided by renaming the panel to something else... --- diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index f3c754151..043686bd8 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -312,7 +312,7 @@ float default_weapon_alpha; .float() customizeentityforclient; .float cvar_cl_handicap; .float cvar_cl_playerdetailreduction; -.float cvar_scr_centertime; +.float cvar_hud_panel_centerprint_time; .string cvar_g_xonoticversion; .string cvar_cl_weaponpriority; .string cvar_cl_weaponpriorities[10]; diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 6622dea1f..33fcebe10 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -579,7 +579,7 @@ void GetCvars(float f) MUTATOR_CALLHOOK(GetCvars); GetCvars_handleFloat(s, f, autoswitch, "cl_autoswitch"); GetCvars_handleFloat(s, f, cvar_cl_playerdetailreduction, "cl_playerdetailreduction"); - GetCvars_handleFloat(s, f, cvar_scr_centertime, "scr_centertime"); + GetCvars_handleFloat(s, f, cvar_hud_panel_centerprint_time, "hud_panel_centerprint_time"); GetCvars_handleString(s, f, cvar_g_xonoticversion, "g_xonoticversion"); GetCvars_handleFloat(s, f, cvar_cl_handicap, "cl_handicap"); GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriority, "cl_weaponpriority", W_FixWeaponOrder_ForceComplete_AndBuildImpulseList); @@ -739,9 +739,9 @@ void centerprint_atprio(entity e, float prio, string s) { e.centerprint_priority = prio; if (timeoutStatus == 2) - e.centerprint_expires = time + (e.cvar_scr_centertime * TIMEOUT_SLOWMO_VALUE); + e.centerprint_expires = time + (e.cvar_hud_panel_centerprint_time * TIMEOUT_SLOWMO_VALUE); else - e.centerprint_expires = time + e.cvar_scr_centertime; + e.centerprint_expires = time + e.cvar_hud_panel_centerprint_time; centerprint_builtin(e, s); } } diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 68aa07a39..0acd63080 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -455,7 +455,7 @@ void PrintWelcomeMessage(entity pl) { string s, modifications, motd; - if(self.cvar_scr_centertime == 0) return; + if(self.cvar_hud_panel_centerprint_time == 0) return; if(autocvar_g_campaign) { @@ -470,7 +470,7 @@ void PrintWelcomeMessage(entity pl) if( !(timeoutStatus >= 1) ) { //really print the WelcomeMessage to the player every frame when timeout-seconds are shown or the game is restarted, to make sure that the shown number is accurate if(self.welcomemessage_time > time) return; - self.welcomemessage_time = time + max(0.5, self.cvar_scr_centertime * 0.6); + self.welcomemessage_time = time + max(0.5, self.cvar_hud_panel_centerprint_time * 0.6); } if(autocvar_g_campaign)