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

View File

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

View File

@ -136,7 +136,16 @@ namespace Components
if (Dvar::Var("sv_mapRotation").Get<std::string>().empty())
{
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;
}