X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Fspawning.qc;h=23a3ee67d6aa5ab8d2ba95d302f2b7514ecbdc39;hb=565754a35f9e84a3b8e6eac08635ec27145b369a;hp=ba17d3f1f893bdb2c42a7aa89fa4e674867ba548;hpb=1236b060b5cde5ec310492417f2f4a03c367a423;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/weapons/spawning.qc b/qcsrc/server/weapons/spawning.qc index ba17d3f1f..23a3ee67d 100644 --- a/qcsrc/server/weapons/spawning.qc +++ b/qcsrc/server/weapons/spawning.qc @@ -26,22 +26,21 @@ string W_Apply_Weaponreplace(string in) return out; } -void weapon_defaultspawnfunc(entity this, Weapon e) +void weapon_defaultspawnfunc(entity this, Weapon wpn) { - Weapon wpn = e; - e = wpn = wpn.m_spawnfunc_hookreplace(wpn, this); + wpn = wpn.m_spawnfunc_hookreplace(wpn, this); this.classname = wpn.m_canonical_spawnfunc; if (!Item_IsLoot(this) && !this.m_isreplaced) { - if (e.spawnflags & WEP_FLAG_MUTATORBLOCKED) + if (wpn.spawnflags & WEP_FLAG_MUTATORBLOCKED) { LOG_WARNF("Attempted to spawn a mutator-blocked weapon rejected: prvm_edict server %i", this); startitem_failed = true; return; } - string s = W_Apply_Weaponreplace(e.netname); - MUTATOR_CALLHOOK(SetWeaponreplace, this, e, s); + string s = W_Apply_Weaponreplace(wpn.netname); + MUTATOR_CALLHOOK(SetWeaponreplace, this, wpn, s); s = M_ARGV(2, string); if (s == "") { @@ -79,6 +78,9 @@ void weapon_defaultspawnfunc(entity this, Weapon e) } } + if(!Item_IsLoot(this)) + weaponsInMapAll |= WepSet_FromWeapon(wpn); + if (!Item_IsDefinitionAllowed(wpn.m_pickup)) { delete(this);