diff --git a/binaries/data/mods/public/gui/session/menu.js b/binaries/data/mods/public/gui/session/menu.js index 7b9574c69c..aeed9704fa 100644 --- a/binaries/data/mods/public/gui/session/menu.js +++ b/binaries/data/mods/public/gui/session/menu.js @@ -683,8 +683,8 @@ function openManual() function toggleDeveloperOverlay() { - // The developer overlay is disabled when cheats are disabled - if (g_IsObserver || !g_SimState.players[Engine.GetPlayerID()].cheatsEnabled) + // The developer overlay is disabled in ranked games + if (Engine.HasXmppClient() && Engine.IsRankedGame()) return; var devCommands = Engine.GetGUIObjectByName("devCommands"); diff --git a/binaries/data/mods/public/simulation/helpers/Commands.js b/binaries/data/mods/public/simulation/helpers/Commands.js index 03e691448d..9d343ed96e 100644 --- a/binaries/data/mods/public/simulation/helpers/Commands.js +++ b/binaries/data/mods/public/simulation/helpers/Commands.js @@ -100,17 +100,11 @@ var g_Commands = { "control-all": function(player, cmd, data) { - if (!data.cmpPlayer.GetCheatsEnabled()) - return; - data.cmpPlayer.SetControlAllUnits(cmd.flag); }, "reveal-map": function(player, cmd, data) { - if (!data.cmpPlayer.GetCheatsEnabled()) - return; - // Reveal the map for all players, not just the current player, // primarily to make it obvious to everyone that the player is cheating var cmpRangeManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager); @@ -560,9 +554,7 @@ var g_Commands = { "promote": function(player, cmd, data) { - if (!data.cmpPlayer.GetCheatsEnabled()) - return; - + // No need to do checks here since this is a cheat anyway var cmpGuiInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface); cmpGuiInterface.PushNotification({"type": "chat", "players": [player], "message": "(Cheat - promoted units)"});