From c7cfa6d3491576206fcea9fcf8d86dfcc398b980 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 27 Sep 2012 11:25:19 +0200 Subject: [PATCH] make sv_cheats code more regular: move sv_cheats 3 mode to sv_cheats 2 too Now sv_cheats 2 means in general "even allow cheats if these may crash the server or whatever" --- qcsrc/server/cheats.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index 65feb4572..746a22d89 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -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; -- 2.39.2