]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/spawning.qc
Display hardwired waypoints purple
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / spawning.qc
index 578c941f7f123528dc29318c2a17dce989e5f805..b493409b0296ebc8f122b473cecf8044b56b9d0a 100644 (file)
@@ -1,9 +1,9 @@
 #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)
 {
@@ -29,17 +29,17 @@ void weapon_defaultspawnfunc(entity this, Weapon e)
        {
                if (e.spawnflags & WEP_FLAG_MUTATORBLOCKED)
                {
-                       objerror("Attempted to spawn a mutator-blocked weapon rejected");
+                       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);
-               s = ret_string;
+               s = M_ARGV(2, string);
                if (s == "")
                {
-                       remove(this);
+                       delete(this);
                        startitem_failed = true;
                        return;
                }
@@ -76,7 +76,7 @@ void weapon_defaultspawnfunc(entity this, Weapon e)
                }
                if (wpn == WEP_Null)
                {
-                       remove(this);
+                       delete(this);
                        startitem_failed = true;
                        return;
                }
@@ -133,6 +133,9 @@ void weapon_defaultspawnfunc(entity this, Weapon e)
        if (g_pickup_weapons_anyway)
                this.pickup_anyway = true;
 
+       if(!this.owner)
+               this.glowmod = wpn.wpcolor;
+
        GameItem def = wpn.m_pickup;
        _StartItem(
                this,