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 1a6dddb..bcd4d51 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 e8dcd79..7ef5172 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 6e2fe4b..d4d5d34 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 93c49af..881d431 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)
                {