return _("Most Weapons Arena");
if(s == weaponarenastring_cvar)
return weaponarenastring;
- if(weaponarenastring)
- strunzone(weaponarenastring);
- if(weaponarenastring_cvar)
- strunzone(weaponarenastring_cvar);
- weaponarenastring_cvar = strzone(s);
+ strcpy(weaponarenastring_cvar, s);
n = tokenize_console(s);
s = "";
for(int j = 0; j < n; ++j)
{
- FOREACH(Weapons, it != WEP_Null, {
- if(argv(j) == it.netname)
- s = cons_mid(s, " & ", it.m_name);
- });
+ Weapon wep = Weapons_fromstr(argv(j));
+ if(wep != WEP_Null)
+ {
+ s = cons_mid(s, " & ", wep.m_name);
+ }
}
s = sprintf(_("%s Arena"), s);
- weaponarenastring = strzone(s);
+ strcpy(weaponarenastring, s);
return weaponarenastring;
}
if(cvar("g_bloodloss") > 0)
s = cons_mid(s, ", ", _("Blood loss"));
if(cvar("g_jetpack"))
- s = cons_mid(s, ", ", _("Jet pack"));
+ s = cons_mid(s, ", ", _("Jetpack"));
if(cvar("g_buffs") > 0)
s = cons_mid(s, ", ", _("Buffs"));
if(cvar("g_overkill"))
_("Players spawn with the grappling hook")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_jetpack", _("Jet pack"),
+ me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_jetpack", _("Jetpack"),
_("Players spawn with the jetpack")));
me.TR(me);
me.TDempty(me, 0.2);
me.gotoRC(me, 0, 2); me.setFirstColumn(me, me.currentColumn);
me.TD(me, 1, 2, e = makeXonoticRadioButton(1, string_null, string_null, _("Regular (no arena)")));
+ string weaponarena_tooltip = strzone(_("Players will be given a set of weapons at spawn as well as unlimited ammo, without weapon pickups"));
me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticRadioButton_T(1, "g_weaponarena", "menu_weaponarena", _("Weapon arenas:"),
- _("Selecting a weapon arena will give all players that weapon at spawn as well as unlimited ammo, and disable all other weapon pickups.")));
+ me.TD(me, 1, 2, makeXonoticTextLabel(0, _("Weapon arenas:")));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1.8, e = makeXonoticRadioButton_T(1, "g_weaponarena", "menu_weaponarena", _("Custom weapons"), weaponarena_tooltip));
e.cvarValueIsAnotherCvar = true;
e.cvarOffValue = "0";
+
+ me.TDempty(me, 0.1); // fix initial position
for(i = WEP_FIRST, j = 0; i <= WEP_LAST; ++i)
{
w = Weapons_from(i);
- if(w.spawnflags & WEP_FLAG_HIDDEN)
+ if (w.spawnflags & (WEP_FLAG_HIDDEN | WEP_FLAG_SPECIALATTACK))
continue;
- if((j & 1) == 0)
+ if ((j % 3) == 0)
+ {
me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.8, e = makeXonoticWeaponarenaCheckBox(strzone(w.netname), strzone(w.m_name)));
+ me.TDempty(me, 0.4);
+ }
+ me.TD(me, 1, 1.2, e = makeXonoticWeaponarenaCheckBox(strzone(w.netname), strzone(w.m_name)));
setDependentWeird(e, checkCompatibility_weaponarena_weapon);
++j;
}
+
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.8, e = makeXonoticRadioButton_T(1, "g_weaponarena", "most", _("Most weapons"),
- _("Selecting a weapon arena will give all players that weapon at spawn as well as unlimited ammo, and disable all other weapon pickups.")));
+ me.TD(me, 1, 1.8, e = makeXonoticRadioButton_T(1, "g_weaponarena", "most", _("Most weapons"), weaponarena_tooltip));
e.cvarOffValue = "0";
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.8, e = makeXonoticRadioButton_T(1, "g_weaponarena", "all", _("All weapons"),
- _("Selecting a weapon arena will give all players that weapon at spawn as well as unlimited ammo, and disable all other weapon pickups.")));
+ me.TD(me, 1, 1.8, e = makeXonoticRadioButton_T(1, "g_weaponarena", "all", _("All weapons"), weaponarena_tooltip));
e.cvarOffValue = "0";
me.TR(me);
me.TD(me, 1, 4, makeXonoticTextLabel(0, _("Special arenas:")));