]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
make sv_cheats code more regular: move sv_cheats 3 mode to sv_cheats 2 too
authorRudolf Polzer <divverent@xonotic.org>
Thu, 27 Sep 2012 09:25:19 +0000 (11:25 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Thu, 27 Sep 2012 09:25:19 +0000 (11:25 +0200)
Now sv_cheats 2 means in general "even allow cheats if these may crash
the server or whatever"

qcsrc/server/cheats.qc

index 65feb45724a8ae1dbf3a83142e64b9d642753150..746a22d8940c622f1ffbb7e51060b082886d3c89 100644 (file)
@@ -48,7 +48,7 @@ float CheatsAllowed(float i, float argc, float fr) // the cheat gets passed as a
        // dead people cannot cheat
        if(self.deadflag != DEAD_NO)
                return 0;
-       if(gamestart_sv_cheats < 3 && self.classname != "player")
+       if(gamestart_sv_cheats < 2 && self.classname != "player")
                return 0;
        
        // sv_clones
@@ -236,7 +236,7 @@ float CheatImpulse(float i)
                                        break;
                                }
                        }
-                       if(MoveToRandomMapLocation(self, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, ((gamestart_sv_cheats >= 2) ? 100000 : 100), 1024, 256))
+                       if(MoveToRandomMapLocation(self, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, ((gamestart_sv_cheats < 2) ? 100 : 100000), 1024, 256))
                        {
                                sprint(self, "Emergency teleport used random location\n");
                                self.angles_x = -self.angles_x;