]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Weapons_fromstr --> Weapon_from_name
authorterencehill <piuntn@gmail.com>
Wed, 27 May 2020 20:20:32 +0000 (22:20 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 27 May 2020 20:20:32 +0000 (22:20 +0200)
qcsrc/common/weapons/all.qh
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/weapons/spawning.qc

index 1a6dddbc2356de009b958737e1c7d2dc16ec941d..bcd4d51a4af4cf9f7937bb36668b745d3ecabe90 100644 (file)
@@ -127,7 +127,7 @@ STATIC_INIT_LATE(W_PROP_reloader)
 REGISTER_WEAPON(Null, NEW(Weapon));
 REGISTRY_DEFINE_GET(Weapons, WEP_Null)
 
-Weapon Weapons_fromstr(string s)
+Weapon Weapon_from_name(string s)
 {
     FOREACH(Weapons, it != WEP_Null && it.netname == s, return it);
     return WEP_Null;
index e8dcd79995fdb3be9b75384db2fe06c82369d07e..7ef5172965ea72611f81b43887b5047f97d5536d 100644 (file)
@@ -37,7 +37,7 @@ string WeaponArenaString()
        s = "";
        for(int j = 0; j < n; ++j)
        {
-               Weapon wep = Weapons_fromstr(argv(j));
+               Weapon wep = Weapon_from_name(argv(j));
                if(wep != WEP_Null)
                {
                        s = cons_mid(s, " & ", wep.m_name);
index 6e2fe4b16e5f316db4960e0d66bdd0078a21822c..d4d5d349449163c529ab6b5223ec7056dcb5814b 100644 (file)
@@ -719,7 +719,7 @@ void readplayerstartcvars()
                for (int j = 0; j < t; ++j)
                {
                        s = argv(j);
-                       Weapon wep = Weapons_fromstr(s);
+                       Weapon wep = Weapon_from_name(s);
                        if(wep != WEP_Null)
                        {
                                g_weaponarena_weapons |= (wep.m_wepset);
index 93c49af9bddb7c7fe02cdd47018d5ce34a3758dd..881d431ae4d4a8b43d4f68804c6f41c7b0ff8ab9 100644 (file)
@@ -14,7 +14,7 @@ string W_Apply_Weaponreplace(string in)
        string out = "";
        FOREACH_WORD(in, true, {
                string replacement = "";
-               Weapon w = Weapons_fromstr(it);
+               Weapon w = Weapon_from_name(it);
                if (w)
                {
             replacement = w.weaponreplace;
@@ -55,7 +55,7 @@ void weapon_defaultspawnfunc(entity this, Weapon wpn)
                        for (int i = 1; i < t; ++i)
                        {
                                s = argv(i);
-                               Weapon wep = Weapons_fromstr(s);
+                               Weapon wep = Weapon_from_name(s);
                                if(wep != WEP_Null)
                                {
                                        entity replacement = spawn();
@@ -68,7 +68,7 @@ void weapon_defaultspawnfunc(entity this, Weapon wpn)
                if (t >= 1) // always the case!
                {
                        s = argv(0);
-                       wpn = Weapons_fromstr(s);
+                       wpn = Weapon_from_name(s);
                }
                if (wpn == WEP_Null)
                {