]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/itemstime_checkmark2
authorterencehill <piuntn@gmail.com>
Sun, 30 Aug 2015 16:25:59 +0000 (18:25 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 30 Aug 2015 16:25:59 +0000 (18:25 +0200)
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc
qcsrc/menu/xonotic/radiobutton.qc
qcsrc/server/cl_client.qc

index ec77c8c4191bdae4ad41733fd2ba9ea17189d4e3..8e7a37f8d6bc925eb08f57c50a0659b5bbf71769 100644 (file)
@@ -236,7 +236,7 @@ void XonoticMutatorsDialog_fill(entity me)
                me.TD(me, 1, 2, e = makeXonoticRadioButton(1, string_null, string_null, _("Regular (no arena)")));
        me.TR(me);
                me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_weaponarena", "menu_weaponarena", _("Weapon arenas:")));
-                       e.getCvarValueFromCvar = true;
+                       e.cvarValueIsAnotherCvar = true;
                        e.cvarOffValue = "0";
        for(i = WEP_FIRST, j = 0; i <= WEP_LAST; ++i)
        {
index 1d2676f1f4db34924bbf1e1cedffc522435ebc37..65f2486f2111e57d749bc28ff73ac2aff1254afa 100644 (file)
@@ -15,7 +15,7 @@ CLASS(XonoticRadioButton, RadioButton)
        ATTRIB(XonoticRadioButton, cvarName, string, string_null)
        ATTRIB(XonoticRadioButton, cvarValue, string, string_null)
        ATTRIB(XonoticRadioButton, cvarOffValue, string, string_null)
-       ATTRIB(XonoticRadioButton, getCvarValueFromCvar, float, 0)
+       ATTRIB(XonoticRadioButton, cvarValueIsAnotherCvar, float, 0)
        METHOD(XonoticRadioButton, loadCvars, void(entity));
        METHOD(XonoticRadioButton, saveCvars, void(entity));
 
@@ -57,7 +57,12 @@ void XonoticRadioButton_loadCvars(entity me)
        if(me.cvarValue)
        {
                if(me.cvarName)
-                       me.checked = (cvar_string(me.cvarName) == me.cvarValue);
+               {
+                       if(me.cvarValueIsAnotherCvar)
+                               me.checked = (cvar_string(me.cvarName) == cvar_string(me.cvarValue));
+                       else
+                               me.checked = (cvar_string(me.cvarName) == me.cvarValue);
+               }
        }
        else
        {
@@ -102,7 +107,7 @@ void XonoticRadioButton_saveCvars(entity me)
                {
                        if(me.checked)
                        {
-                               if(me.getCvarValueFromCvar)
+                               if(me.cvarValueIsAnotherCvar)
                                        cvar_set(me.cvarName, cvar_string(me.cvarValue));
                                else
                                        cvar_set(me.cvarName, me.cvarValue);
index 3674755f2c61516ef03048a0a4e0f5ecaabd763a..4d7b9fa0bf25a20d901ad6e231e525c070e74fbb 100644 (file)
@@ -2663,6 +2663,7 @@ Called every frame for each client after the physics are run
 void PlayerPostThink (void)
 {
        if(sv_maxidle > 0 && frametime) // WORKAROUND: only use dropclient in server frames (frametime set). Never use it in cl_movement frames (frametime zero).
+       if(IS_REAL_CLIENT(self))
        if(IS_PLAYER(self) || sv_maxidle_spectatorsareidle)
        {
                if (time - self.parm_idlesince < 1) // instead of (time == self.parm_idlesince) to support sv_maxidle <= 10