]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Also replace cvar_scr_centertime with cvar_hud_panel_centerprint_time
authorterencehill <piuntn@gmail.com>
Tue, 24 May 2011 19:44:35 +0000 (21:44 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 24 May 2011 19:44:35 +0000 (21:44 +0200)
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...

qcsrc/server/defs.qh
qcsrc/server/miscfunctions.qc
qcsrc/server/teamplay.qc

index f3c754151e87ac719a10ff11bdc9758160b92e66..043686bd898280058340d096618082ab3d15d676 100644 (file)
@@ -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];
index 6622dea1ff5c6ca9c8cbce3b7114252cb9136ffd..33fcebe10344ed272ea2465ce6f975f33384905c 100644 (file)
@@ -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);
     }
 }
index 68aa07a39bc1115a896372118d08fca93537eac7..0acd63080878658a6f6ef43463e988a6bba7c9a8 100644 (file)
@@ -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)