]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/spawning.qc
waeponarena {all,most}_available
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / spawning.qc
index ba17d3f1f893bdb2c42a7aa89fa4e674867ba548..0922b50d9687c3fd75fb69d48277ef6b6b354bcb 100644 (file)
@@ -28,7 +28,7 @@ string W_Apply_Weaponreplace(string in)
 
 void weapon_defaultspawnfunc(entity this, Weapon e)
 {
-       Weapon wpn = e;
+       Weapon wpn = e; // TODO unify wpn and e
        e = wpn = wpn.m_spawnfunc_hookreplace(wpn, this);
        this.classname = wpn.m_canonical_spawnfunc;
        if (!Item_IsLoot(this) && !this.m_isreplaced)
@@ -79,6 +79,9 @@ void weapon_defaultspawnfunc(entity this, Weapon e)
                }
        }
 
+       if(!Item_IsLoot(this))
+               weaponsInMapAll |= WepSet_FromWeapon(wpn);
+
        if (!Item_IsDefinitionAllowed(wpn.m_pickup))
        {
                delete(this);