#include "spawning.qh"
#include "weaponsystem.qh"
-#include "../mutators/all.qh"
+#include "../mutators/_mod.qh"
#include <common/t_items.qh>
-#include <common/weapons/all.qh>
+#include <common/weapons/_all.qh>
string W_Apply_Weaponreplace(string in)
{
{
if (e.spawnflags & WEP_FLAG_MUTATORBLOCKED)
{
- LOG_MAPWARNF("Attempted to spawn a mutator-blocked weapon rejected: prvm_edict server %i", this);
+ LOG_WARNF("Attempted to spawn a mutator-blocked weapon rejected: prvm_edict server %i", this);
startitem_failed = true;
return;
}
s = M_ARGV(2, string);
if (s == "")
{
- remove(this);
+ delete(this);
startitem_failed = true;
return;
}
for (int i = 1; i < t; ++i)
{
s = argv(i);
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ FOREACH(Weapons, it != WEP_Null, {
if(it.netname == s)
{
entity replacement = spawn();
weapon_defaultspawnfunc(replacement, it);
break;
}
- ));
+ });
}
}
if (t >= 1) // always the case!
{
s = argv(0);
wpn = WEP_Null;
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ FOREACH(Weapons, it != WEP_Null, {
if(it.netname == s)
{
wpn = it;
break;
}
- ));
+ });
}
if (wpn == WEP_Null)
{
- remove(this);
+ delete(this);
startitem_failed = true;
return;
}
if (g_pickup_weapons_anyway)
this.pickup_anyway = true;
+ if(!this.owner)
+ this.glowmod = wpn.wpcolor;
+
GameItem def = wpn.m_pickup;
_StartItem(
this,