From 3ff2c40f7a018de64a43d477d45a9dcc2c2b6b8a Mon Sep 17 00:00:00 2001 From: momo5502 Date: Mon, 22 Aug 2016 13:29:25 +0200 Subject: [PATCH] Add devmap to maprotation (credit to @Dasfonia) --- deps/fmt | 2 +- deps/mongoose | 2 +- deps/protobuf | 2 +- src/Components/Modules/AntiCheat.hpp | 5 +++++ src/Components/Modules/Dedicated.cpp | 11 ++++++++++- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/deps/fmt b/deps/fmt index f19d8f96..93975c70 160000 --- a/deps/fmt +++ b/deps/fmt @@ -1 +1 @@ -Subproject commit f19d8f9655d550234f19c6c1f5a99c7eda798c0e +Subproject commit 93975c70bb373cd2d31361a1963384424aff0319 diff --git a/deps/mongoose b/deps/mongoose index af6fc64a..fd839f18 160000 --- a/deps/mongoose +++ b/deps/mongoose @@ -1 +1 @@ -Subproject commit af6fc64ab9bec64e91b2bebc16f71d07d5d2e208 +Subproject commit fd839f18275e5fde419497a254c129c6ad764b42 diff --git a/deps/protobuf b/deps/protobuf index 549dde19..ff2a6600 160000 --- a/deps/protobuf +++ b/deps/protobuf @@ -1 +1 @@ -Subproject commit 549dde19282767af6ba875ace06644ab5cfd14e2 +Subproject commit ff2a6600e5df21683b86aca7e30bbb80c0aed848 diff --git a/src/Components/Modules/AntiCheat.hpp b/src/Components/Modules/AntiCheat.hpp index c9308b7c..8936c94b 100644 --- a/src/Components/Modules/AntiCheat.hpp +++ b/src/Components/Modules/AntiCheat.hpp @@ -1,3 +1,8 @@ +#ifndef DEBUG +// Hide AntiCheat in embeded symbol names +#define AntiCheat SubComponent +#endif + namespace Components { class AntiCheat : public Component diff --git a/src/Components/Modules/Dedicated.cpp b/src/Components/Modules/Dedicated.cpp index 329e13d3..4e980637 100644 --- a/src/Components/Modules/Dedicated.cpp +++ b/src/Components/Modules/Dedicated.cpp @@ -136,7 +136,16 @@ namespace Components if (Dvar::Var("sv_mapRotation").Get().empty()) { Logger::Print("No rotation defined, restarting map.\n"); - Command::Execute(fmt::sprintf("map %s", Dvar::Var("mapname").Get()), true); + + if (!Dvar::Var("sv_cheats").Get()) + { + Command::Execute(fmt::sprintf("map %s", Dvar::Var("mapname").Get()), true); + } + else + { + Command::Execute(fmt::sprintf("devmap %s", Dvar::Var("mapname").Get()), true); + } + return; }