Add devmap to maprotation (credit to @Dasfonia)

This commit is contained in:
momo5502 2016-08-22 13:29:25 +02:00
parent 8e72395ab9
commit 3ff2c40f7a
5 changed files with 18 additions and 4 deletions

2
deps/fmt vendored

@ -1 +1 @@
Subproject commit f19d8f9655d550234f19c6c1f5a99c7eda798c0e Subproject commit 93975c70bb373cd2d31361a1963384424aff0319

2
deps/mongoose vendored

@ -1 +1 @@
Subproject commit af6fc64ab9bec64e91b2bebc16f71d07d5d2e208 Subproject commit fd839f18275e5fde419497a254c129c6ad764b42

2
deps/protobuf vendored

@ -1 +1 @@
Subproject commit 549dde19282767af6ba875ace06644ab5cfd14e2 Subproject commit ff2a6600e5df21683b86aca7e30bbb80c0aed848

View File

@ -1,3 +1,8 @@
#ifndef DEBUG
// Hide AntiCheat in embeded symbol names
#define AntiCheat SubComponent
#endif
namespace Components namespace Components
{ {
class AntiCheat : public Component class AntiCheat : public Component

View File

@ -136,7 +136,16 @@ namespace Components
if (Dvar::Var("sv_mapRotation").Get<std::string>().empty()) if (Dvar::Var("sv_mapRotation").Get<std::string>().empty())
{ {
Logger::Print("No rotation defined, restarting map.\n"); Logger::Print("No rotation defined, restarting map.\n");
Command::Execute(fmt::sprintf("map %s", Dvar::Var("mapname").Get<const char*>()), true);
if (!Dvar::Var("sv_cheats").Get<bool>())
{
Command::Execute(fmt::sprintf("map %s", Dvar::Var("mapname").Get<const char*>()), true);
}
else
{
Command::Execute(fmt::sprintf("devmap %s", Dvar::Var("mapname").Get<const char*>()), true);
}
return; return;
} }