]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc
Makefile: use `-I.`
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_multiplayer_create_mutators.qc
index 8b9ddf9b252860304e03ad6fb96c5dc2131547d0..a411a8a7f3d45d0a1c50bbfa7562708648d08321 100644 (file)
@@ -1,4 +1,4 @@
-#include "../../common/weapons/all.qh"
+#include <common/weapons/all.qh>
 
 #ifndef DIALOG_MULTIPLAYER_CREATE_MUTATORS_H
 #define DIALOG_MULTIPLAYER_CREATE_MUTATORS_H
@@ -28,8 +28,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 "";
@@ -50,12 +49,10 @@ string WeaponArenaString()
        s = "";
        for(i = 0; i < n; ++i)
        {
-               for(j = WEP_FIRST; j <= WEP_LAST; ++j)
-               {
-                       e = Weapons_from(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));