]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
reject to spawn mutator blocked guns
authorRudolf Polzer <divverent@xonotic.org>
Mon, 5 Mar 2012 13:05:41 +0000 (14:05 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 5 Mar 2012 13:05:41 +0000 (14:05 +0100)
qcsrc/server/t_items.qc

index 8ab6f521030c6d2c815c7d0c3eddd1a0fb0e38f0..eaba390ed6b693363120416ba12fc8fa6895e8d4 100644 (file)
@@ -987,6 +987,14 @@ void weapon_defaultspawnfunc(float wpn)
        if(self.classname != "droppedweapon" && self.classname != "replacedweapon")
        {
                e = get_weaponinfo(wpn);
+
+               if(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)
+               {
+                       objerror("Attempted to spawn a mutator-blocked weapon rejected");
+                       startitem_failed = TRUE;
+                       return;
+               }
+
                s = W_Apply_Weaponreplace(e.netname);
                ret_string = s;
                other = e;