-#include "../../common/weapons/all.qh"
+#include <common/weapons/all.qh>
#ifndef DIALOG_MULTIPLAYER_CREATE_MUTATORS_H
#define DIALOG_MULTIPLAYER_CREATE_MUTATORS_H
#ifdef IMPLEMENTATION
void XonoticMutatorsDialog_showNotify(entity me)
{
+ SUPER(XonoticMutatorsDialog).showNotify(me);
loadAllCvars(me);
}
string WeaponArenaString()
{
string s;
- float n, i, j;
- entity e;
+ float n, i;
s = cvar_string("g_weaponarena");
if(s == "0")
return "";
s = "";
for(i = 0; i < n; ++i)
{
- for(j = WEP_FIRST; j <= WEP_LAST; ++j)
- {
- e = get_weaponinfo(j);
- if(argv(i) == e.netname)
- s = strcat(s, " & ", e.message);
- }
+ FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ if(argv(i) == it.netname)
+ s = strcat(s, " & ", it.m_name);
+ ));
}
s = sprintf(_("%s Arena"), substring(s, 3, strlen(s) - 3));
return weaponarenastring;
}
+AUTOCVAR(g_grappling_hook, bool, _("let players spawn with the grappling hook which allows them to pull themselves up"));
+
string XonoticMutatorsDialog_toString(entity me)
{
string s;
s = strcat(s, ", ", _("Low gravity"));
if(cvar("g_cloaked"))
s = strcat(s, ", ", _("Cloaked"));
- if(cvar("g_grappling_hook"))
+ if(autocvar_g_grappling_hook)
s = strcat(s, ", ", _("Hook"));
if(cvar("g_midair"))
s = strcat(s, ", ", _("Midair"));
e.cvarOffValue = "0";
for(i = WEP_FIRST, j = 0; i <= WEP_LAST; ++i)
{
- w = get_weaponinfo(i);
+ w = Weapons_from(i);
if(w.spawnflags & WEP_FLAG_HIDDEN)
continue;
if((j & 1) == 0)
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.8, e = makeXonoticWeaponarenaCheckBox(strzone(w.netname), strzone(w.message)));
+ me.TD(me, 1, 1.8, e = makeXonoticWeaponarenaCheckBox(strzone(w.netname), strzone(w.m_name)));
setDependentWeird(e, checkCompatibility_weaponarena_weapon);
++j;
}