59.void(
entity me) saveCvars_Multi;
62 if (me.controlledCvars_Multi)
63 return me.controlledCvars_Multi;
71 me.saveCvars_Multi(me);
75 for(i = 0; i < n; ++i)
81 cvar_set(cvarname, ((s ==
"0") ?
"1" :
"0"));
94 e.controlledCvars_Multi = otherCvars;
95 e.saveCvars_Multi = e.saveCvars;
99.void(
entity me) saveCvars_Callback;
104 me.saveCvars_Callback(me);
105 me.saveCvars_Callback_func(me.saveCvars_Callback_ent, me);
109 e.saveCvars_Callback = e.saveCvars;
111 e.saveCvars_Callback_ent = cbent;
112 e.saveCvars_Callback_func = cbfunc;
126.void(
entity) draw_setDependent;
129 bool disabled_prev = e.disabled;
132 if (e.func_setDependent)
134 e.disabled = !(e.func_setDependent(e));
136 else if (e.cvarString_setDependent)
139 e.disabled = (
cvar_string(e.cvarString_setDependent) == e.cvarValue_setDependent);
141 else if (e.cvar1_setDependent)
143 f =
cvar(e.cvar1_setDependent);
144 if (e.op_setDependent &
BIT(1))
145 e.disabled = (f == e.cvar1Min_setDependent);
148 if (e.cvar1Min_setDependent <= e.cvar1Max_setDependent)
149 e.disabled = ((f < e.cvar1Min_setDependent) || (f > e.cvar1Max_setDependent));
151 e.disabled = ((f >= e.cvar1Max_setDependent) && (f <= e.cvar1Min_setDependent));
154 int op = e.op_setDependent &
BIT(0);
155 if (e.cvar2_setDependent)
157 f =
cvar(e.cvar2_setDependent);
158 if (e.cvar2Min_setDependent <= e.cvar2Max_setDependent)
159 e.disabled = (e.disabled + ((f < e.cvar2Min_setDependent) || (f > e.cvar2Max_setDependent)) > op);
161 e.disabled = (e.disabled + ((f >= e.cvar2Max_setDependent) && (f <= e.cvar2Min_setDependent)) > op);
163 if (e.cvar3_setDependent)
165 f =
cvar(e.cvar3_setDependent);
166 if (e.cvar3Min_setDependent <= e.cvar3Max_setDependent)
167 e.disabled = (e.disabled + ((f < e.cvar3Min_setDependent) || (f > e.cvar3Max_setDependent)) > op);
169 e.disabled = (e.disabled + ((f >= e.cvar3Max_setDependent) && (f <= e.cvar3Min_setDependent)) > op);
171 if (disabled_prev != e.disabled && e.loadCvars)
177 e.draw_setDependent(e);
182 e.draw_setDependent = e.draw;
183 e.cvar1_setDependent = theCvarName;
184 e.cvar1Min_setDependent = theCvarMin;
185 e.cvar1Max_setDependent = theCvarMax;
186 e.op_setDependent = 0;
194 e.draw_setDependent = e.draw;
195 e.cvar1_setDependent = theCvarName;
196 e.cvar1Min_setDependent = theCvarValue;
197 e.cvar1Max_setDependent = theCvarValue;
198 e.op_setDependent |=
BIT(1);
206 e.draw_setDependent = e.draw;
207 e.cvarString_setDependent = theCvarName;
208 e.cvarValue_setDependent = theCvarValue;
215 if (e.cvar2_setDependent)
217 e.cvar3_setDependent = theCvarName;
218 e.cvar3Min_setDependent = theCvarMin;
219 e.cvar3Max_setDependent = theCvarMax;
223 e.cvar2_setDependent = theCvarName;
224 e.cvar2Min_setDependent = theCvarMin;
225 e.cvar2Max_setDependent = theCvarMax;
227 e.op_setDependent &=
~BIT(0);
233 if (e.cvar2_setDependent)
235 e.cvar3_setDependent = theCvarName;
236 e.cvar3Min_setDependent = theCvarMin;
237 e.cvar3Max_setDependent = theCvarMax;
241 e.cvar2_setDependent = theCvarName;
242 e.cvar2Min_setDependent = theCvarMin;
243 e.cvar2Max_setDependent = theCvarMax;
245 e.op_setDependent |=
BIT(0);
251 e.draw_setDependent = e.draw;
252 e.func_setDependent = func;
263 string t = cvar_description(theCvar);
264 if(t !=
"" && t !=
"custom cvar")
268 else if(theTooltip ==
"-")
312 LOG_INFOF(
"Received HTTP request data for an invalid id %d.",
id);
322 LOG_TRACE(
"error: UpdateNotification_URI_Get_Callback has been called before");
327 LOG_TRACEF(
"error receiving update notification: status is %d", status);
332 LOG_TRACE(
"error: received HTML instead of an update notification");
337 LOG_TRACE(
"error: received carriage returns from update notification server");
349 string un_version =
"";
350 string un_tosversion =
"";
351 string un_download =
"";
353 string un_bannedservers =
"";
354 string un_emergency_pk3s =
"";
355 string un_promoted =
"";
356 string un_recommended =
"";
357 string un_compatexpire =
"";
359 for(i = 0; i < n; ++i)
362 if(s ==
"") {
continue; }
420 if(un_download) {
LOG_INFO(_(
"Update can be downloaded at:"),
"\n", un_download); }
424 if(un_tosversion !=
"")
429 if(un_bannedservers !=
"")
435 if(un_emergency_pk3s !=
"")
441 if(un_promoted !=
"")
447 if(un_recommended !=
"")
471 for(i = 0; i+1 < n; i += 2)
475 string packfn = whichpack(
"hotfix-autoexec.cfg");
478 if(!
strncmp(packfn,
"dlcache/", 8))
495 localcmd(
"\nexec hotfix-autoexec.cfg\n");
518 draw_CenterText(
'0.5 0.5 0' - 1.25 * sz.y *
eY, _(
"Autogenerating mapinfo for newly added maps..."), sz,
'1 1 1', 1, 0);
520 boxA =
'0.05 0.5 0' + 0.25 * sz.y *
eY;
521 boxB =
'0.95 0.5 0' + 1.25 * sz.y *
eY;
522 draw_Fill(boxA, boxB - boxA,
'1 1 1', 1);
526 draw_Fill(boxA, boxB - boxA,
'0.1 0.1 0.1', 1);
529 draw_Fill(boxA, boxB - boxA,
'0 0 1', 1);
543 vector fs, sz =
'0 0 0', line, mid;
554 l2 =
"https://xonotic.org";
565 mid =
eX * (0.5 + 0.5 * (1 - sz.x) *
cos(
time * 0.071))
566 +
eY * (0.5 + 0.5 * (1 - sz.y) *
sin(
time * 0.071));
568 draw_Fill(mid - 0.5 * sz, sz,
'1 1 0', 1);
606 bool have_dds = (
fexists(
"dds/particles/particlefont.dds"));
607 bool have_jpg = (
fexists(
"particles/particlefont.jpg"));
608 bool have_tga = (
fexists(
"particles/particlefont.tga"));
612 cvar_set(
"gl_texturecompression",
"0");
614 if(have_dds && (have_jpg || have_tga))
623 cvar_set(
"r_texture_dds_load",
"1");
626 cvar_set(
"r_texture_dds_swdecode",
"1");
627 LOG_WARN(_(
"^1ERROR: Texture compression is required but not supported.\n^1Expect visual problems."));
638 GAMETYPE(MAPINFO_TYPE_DEATHMATCH) \
639 GAMETYPE(MAPINFO_TYPE_TEAM_DEATHMATCH) \
640 GAMETYPE(MAPINFO_TYPE_CTF) \
641 GAMETYPE(MAPINFO_TYPE_CA) \
642 GAMETYPE(MAPINFO_TYPE_FREEZETAG) \
643 GAMETYPE(MAPINFO_TYPE_MAYHEM) \
644 GAMETYPE(MAPINFO_TYPE_TEAM_MAYHEM) \
645 GAMETYPE(MAPINFO_TYPE_KEEPAWAY) \
646 GAMETYPE(MAPINFO_TYPE_TEAM_KEEPAWAY) \
647 GAMETYPE(MAPINFO_TYPE_KEYHUNT) \
648 GAMETYPE(MAPINFO_TYPE_LMS) \
649 GAMETYPE(MAPINFO_TYPE_DOMINATION) \
650 GAMETYPE(MAPINFO_TYPE_NEXBALL) \
651 GAMETYPE(MAPINFO_TYPE_ONSLAUGHT) \
652 GAMETYPE(MAPINFO_TYPE_ASSAULT) \
653 GAMETYPE(MAPINFO_TYPE_SURVIVAL) \
658#define HIDDEN_GAMETYPES \
659 GAMETYPE(MAPINFO_TYPE_RACE) \
660 GAMETYPE(MAPINFO_TYPE_CTS) \
661 GAMETYPE(MAPINFO_TYPE_INVASION) \
667 #define GAMETYPE(it) { if (i++ == cnt) return it; }
678 #define GAMETYPE(id) ++i;
681 #define GAMETYPE(it) { if (showall) ++i; }
690 #define GAMETYPE(id) ++i;
716.void(
entity) configureXonoticTextSliderValues;
736 me.gotoRC(me, me.currentRow + 1.5, 0);
739 e.setValueSpace(e, e.valueSpace * 1.25);
740 e.addValue(e, _(
"Default"),
"");
741 e.addValue(e, _(
"Disable"),
"0");
743 e.configureXonoticTextSliderValues(e);
757 e.addValue(e, _(
"Default"),
"");
758 e.addValue(e, _(
"Disable"),
"0");
759 for(i = 1; i <= 10; ++i)
761 e.configureXonoticTextSliderValues(e);
766 e.addValue(e, _(
"Default"),
"");
767 for(i = 1; i <= 20; ++i)
769 e.configureXonoticTextSliderValues(e);
775 e.addValue(e, _(
"Default"),
"");
776 e.addValue(e, _(
"Disable"),
"0");
777 for(i = 1; i <= 10; ++i)
779 e.configureXonoticTextSliderValues(e);
783 me.TD(me, 1, 3.6, e =
makeXonoticCheckBox(0,
"hud_configure_teamcolorforced", _(
"Test team color in configure mode")));
788 e.addValue(e, _(
"Default"),
"");
789 for(i = 0; i <= 10; ++i)
791 e.configureXonoticTextSliderValues(e);
793 string hide_ondeath =
strcat(
"hud_panel_", panelname,
"_hide_ondeath");
801 me.gotoRC(me, me.currentRow + 0.5, 0); me.setFirstColumn(me, me.currentColumn);
812 localcmd(
"defer 0.1 \"sv_cmd settemp net_address 127.0.0.1\"\n");
813 localcmd(
"defer 0.1 \"sv_cmd settemp net_address_ipv6 ::1\"\n");
818 if(startAlpha < targetAlpha)
819 currentAlpha =
min(currentAlpha +
frametime * 0.5, targetAlpha);
821 currentAlpha =
max(currentAlpha -
frametime * 0.5, targetAlpha);
832 localcmd(sprintf(
"\nsendcvar %s\n", cvarnamestring));
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void depthfirst(entity start,.entity up,.entity downleft,.entity right, void(entity, entity) funcPre, void(entity, entity) funcPost, entity pass)
#define APPEND_TO_STRING(list, sep, add)
float CVAR_TYPEFLAG_EXISTS
#define tokenizebyseparator
#define pass(name, colormin, colormax)
ERASEABLE bool fexists(string f)
bool autocvar_menu_create_show_all
void Curl_URI_Get_Callback(int id, float status, string data)
string MapInfo_Type_ToString(Gametype t)
float _MapInfo_FilterGametype(vector pGametype, int pFeatures, int pFlagsRequired, int pFlagsForbidden, bool pAbortOnGenerate)
void MapInfo_Cache_Create()
string MapInfo_Type_ToText(Gametype t)
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
ERASEABLE string ftos_decimals(float number, int decimals)
converts a number to a string with the indicated number of decimals
ERASEABLE int vercmp(string v1, string v2)
ERASEABLE string ftos_mindecimals(float number)
Converts a number to a string with the minimum number of decimals It assumes that an extreme accuracy...
ERASEABLE string ftos_decimals_percentage(float number, int decimals)
converts a percentage to a string with the indicated number of decimals
ERASEABLE float url_URI_Get_Callback(int id, float status, string data)
const int URI_GET_DISCARD
const int URI_GET_CURL_END
const int URI_GET_UPDATENOTIFICATION