X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Fspawning.qc;h=e2a28f254ade99e3704d5b3880a113f8c3132b51;hb=c98cf4cd2907eb3396bfc363c1e88ed99fac4b85;hp=6a2d65db2075b19a02a74cbba26adf4f47c8d17b;hpb=fbd3279e575e41377901f1536e14fe45e540405b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/weapons/spawning.qc b/qcsrc/server/weapons/spawning.qc index 6a2d65db2..e2a28f254 100644 --- a/qcsrc/server/weapons/spawning.qc +++ b/qcsrc/server/weapons/spawning.qc @@ -31,7 +31,7 @@ void weapon_defaultspawnfunc(entity this, Weapon wpn) { wpn = wpn.m_spawnfunc_hookreplace(wpn, this); this.classname = wpn.m_canonical_spawnfunc; - if (!Item_IsLoot(this) && !this.m_isreplaced) + if (!ITEM_IS_LOOT(this) && !this.m_isreplaced) { if (wpn.spawnflags & WEP_FLAG_MUTATORBLOCKED) { @@ -60,7 +60,7 @@ void weapon_defaultspawnfunc(entity this, Weapon wpn) if(wep != WEP_Null) { entity replacement = spawn(); - copyentity(this, replacement); + Item_CopyFields(this, replacement); replacement.m_isreplaced = true; weapon_defaultspawnfunc(replacement, wep); } @@ -79,7 +79,7 @@ void weapon_defaultspawnfunc(entity this, Weapon wpn) } } - if(!Item_IsLoot(this)) + if(!ITEM_IS_LOOT(this)) weaponsInMapAll |= WepSet_FromWeapon(wpn); if (!Item_IsDefinitionAllowed(wpn.m_pickup)) @@ -153,15 +153,10 @@ void weapon_defaultspawnfunc(entity this, Weapon wpn) if(!this.owner) this.glowmod = wpn.wpcolor; else - this.glowmod = colormapPaletteColor(this.owner.clientcolors & 0x0F, true) * 2; - - GameItem def = wpn.m_pickup; - _StartItem( - this, - this.itemdef = def, - this.respawntime, // defaultrespawntime - this.respawntimejitter // defaultrespawntimejitter - ); + this.glowmod = colormapPaletteColor(this.owner.clientcolors & 0x0F, true); + + StartItem(this, wpn.m_pickup); + #if 0 // WEAPONTODO if (this.modelindex) { // don't precache if this was removed wpn.wr_init(wpn);