Use the proper typedef on Weapons_fromstr cases
authorMario <zacjardine@y7mail.com>
Thu, 13 Sep 2018 21:24:03 +0000 (07:24 +1000)
committerMario <zacjardine@y7mail.com>
Thu, 13 Sep 2018 21:24:03 +0000 (07:24 +1000)
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/weapons/spawning.qc

index 678578068f526513c83b98924188ac8197afff82..8b6dd4b731512cec3da19fe489dc512a04245108 100644 (file)
@@ -37,7 +37,7 @@ string WeaponArenaString()
        s = "";
        for(int j = 0; j < n; ++j)
        {
-               entity wep = Weapons_fromstr(argv(j));
+               Weapon wep = Weapons_fromstr(argv(j));
                if(wep != WEP_Null)
                {
                        s = cons_mid(s, " & ", wep.m_name);
index 351fa43509de16e2d24d7103779141aaf0b13f9b..cf7266b483a9cb837b6a879ee35559128556da3d 100644 (file)
@@ -600,7 +600,7 @@ void readplayerstartcvars()
                for (i = 0; i < t; ++i)
                {
                        s = argv(i);
-                       entity wep = Weapons_fromstr(s);
+                       Weapon wep = Weapons_fromstr(s);
                        if(wep != WEP_Null)
                        {
                                g_weaponarena_weapons |= (wep.m_wepset);
index 37ef94c375946e0f2f058644a078adf9203a6781..4ab5a43717c14e472bc30f0e5cdf6ab98d6bbbb7 100644 (file)
@@ -56,7 +56,7 @@ void weapon_defaultspawnfunc(entity this, Weapon e)
                        for (int i = 1; i < t; ++i)
                        {
                                s = argv(i);
-                               entity wep = Weapons_fromstr(s);
+                               Weapon wep = Weapons_fromstr(s);
                                if(wep != WEP_Null)
                                {
                                        entity replacement = spawn();