From: terencehill Date: Tue, 4 Aug 2015 20:24:37 +0000 (+0200) Subject: Give a more explicative name to a variable X-Git-Tag: xonotic-v0.8.2~1944^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=492f2d61d4c2ab3d9afbf5d924eba3685c12ce8d;p=xonotic%2Fxonotic-data.pk3dir.git Give a more explicative name to a variable --- diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc index 8ab529638..123caa89d 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc @@ -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) { diff --git a/qcsrc/menu/xonotic/radiobutton.qc b/qcsrc/menu/xonotic/radiobutton.qc index f29148380..51f4cc6a2 100644 --- a/qcsrc/menu/xonotic/radiobutton.qc +++ b/qcsrc/menu/xonotic/radiobutton.qc @@ -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)) @@ -58,7 +58,7 @@ void XonoticRadioButton_loadCvars(entity me) { if(me.cvarName) { - if(me.getCvarValueFromCvar) + if(me.cvarValueIsAnotherCvar) me.checked = (cvar_string(me.cvarName) == cvar_string(me.cvarValue)); else me.checked = (cvar_string(me.cvarName) == me.cvarValue); @@ -107,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);