X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fdialog_multiplayer_create_mutators.qc;h=e90a909595e7de504b04487c13412440f3e46b8c;hp=eff3723bd46e6315bb6a5d0495776cff77a06312;hb=692cb758fe8f25fa078bfd5885333ee031885600;hpb=045a9a870f044123cbecfd3f0432671371c40fd8 diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc index eff3723bd4..e90a909595 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc @@ -1,4 +1,4 @@ -#include "../../common/weapons/all.qh" +#include #ifndef DIALOG_MULTIPLAYER_CREATE_MUTATORS_H #define DIALOG_MULTIPLAYER_CREATE_MUTATORS_H @@ -29,8 +29,7 @@ string weaponarenastring_cvar; string WeaponArenaString() { string s; - float n, i, j; - entity e; + float n, i; s = cvar_string("g_weaponarena"); if(s == "0") return ""; @@ -51,12 +50,10 @@ string WeaponArenaString() 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.m_name); - } + 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)); @@ -254,7 +251,7 @@ void XonoticMutatorsDialog_fill(entity me) 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)