]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator_superspec.qc
Merge branch 'Mario/rifle_arena' into Mario/mutators
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_superspec.qc
index f66c9657e26540a26564d8cdc3f60468fa15932b..eea3979c44d7f0dc6ea57d7561a99f16aaafac65 100644 (file)
@@ -21,7 +21,7 @@
 
 float _spectate(entity _player)
 {
-       if(SpectateNext(_player) == 1)
+       if(Spectate(_player) == 1)
        {
                PutObserverInServer();
                self.classname = "spectator";
@@ -82,7 +82,7 @@ float superspec_filteritem(entity _for, entity _item)
 {
        float i;
 
-       if(!_for.superspec_itemfilter)
+       if(_for.superspec_itemfilter == "")
                return TRUE;
 
        if(_for.superspec_itemfilter == "")
@@ -117,7 +117,7 @@ MUTATOR_HOOKFUNCTION(superspec_ItemTouch)
                                        _spectate(other);
 
                                        self = _oldself;
-                                       return FALSE;
+                                       return MUT_ITEMTOUCH_CONTINUE;
                                }
                        }
 
@@ -149,7 +149,7 @@ MUTATOR_HOOKFUNCTION(superspec_ItemTouch)
 
        self = _oldself;
 
-       return FALSE;
+       return MUT_ITEMTOUCH_CONTINUE;
 }
 
 MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand)
@@ -392,9 +392,9 @@ MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand)
                if(cmd_argc == 2)
                {
                        if(argv(1) == "red")
-                               _team = COLOR_TEAM1;
+                               _team = NUM_TEAM_1;
                        else
-                               _team = COLOR_TEAM2;
+                               _team = NUM_TEAM_2;
                }
 
                FOR_EACH_PLAYER(_player)
@@ -443,6 +443,9 @@ void superspec_hello()
 
 MUTATOR_HOOKFUNCTION(superspec_ClientConnect)
 {
+       if(!IS_REAL_CLIENT(self))
+               return FALSE;
+
        string fn = "superspec-local.options";
        float fh;