#include "spawning.qh"
+#include <common/resources/sv_resources.qh>
#include <common/weapons/_all.qh>
#include <server/items/items.qh>
#include <server/items/spawning.qh>
#include <server/mutators/_mod.qh>
-#include <server/resources.qh>
#include <server/weapons/weaponsystem.qh>
#include <server/world.qh>
if(wep != WEP_Null)
{
entity replacement = spawn();
- copyentity(this, replacement);
+ Item_CopyFields(this, replacement);
+ // DO NOT USE, causes #2792
+ //copyentity(this, replacement);
replacement.m_isreplaced = true;
weapon_defaultspawnfunc(replacement, wep);
}
this.superweapons_finished = autocvar_g_balance_superweapons_time;
// if we don't already have ammo, give us some ammo
+ // TODO: registry handles
if ((wpn.ammo_type != RES_NONE) && !GetResource(this, wpn.ammo_type))
{
int ammo = 0;
if(!this.owner)
this.glowmod = wpn.wpcolor;
+ else
+ this.glowmod = colormapPaletteColor(this.owner.clientcolors & 0x0F, true);
GameItem def = wpn.m_pickup;
_StartItem(