diff --git a/binaries/data/mods/public/gui/session/menu.js b/binaries/data/mods/public/gui/session/menu.js index a4f09d0c9f..41b76cbcef 100644 --- a/binaries/data/mods/public/gui/session/menu.js +++ b/binaries/data/mods/public/gui/session/menu.js @@ -1121,8 +1121,7 @@ function openManual() function toggleDeveloperOverlay() { - // The developer overlay is disabled in ranked games - if (Engine.HasXmppClient() && Engine.IsRankedGame()) + if (!g_GameAttributes.settings.CheatsEnabled) return; let 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 fbed19e95d..f455e9643a 100644 --- a/binaries/data/mods/public/simulation/helpers/Commands.js +++ b/binaries/data/mods/public/simulation/helpers/Commands.js @@ -114,6 +114,9 @@ var g_Commands = { "control-all": function(player, cmd, data) { + if (!data.cmpPlayer.GetCheatsEnabled()) + return; + var cmpGuiInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface); cmpGuiInterface.PushNotification({ "type": "aichat", @@ -126,6 +129,9 @@ var g_Commands = { "reveal-map": function(player, cmd, data) { + if (!data.cmpPlayer.GetCheatsEnabled()) + return; + var cmpGuiInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface); cmpGuiInterface.PushNotification({ "type": "aichat", @@ -563,6 +569,9 @@ var g_Commands = { "promote": function(player, cmd, data) { + if (!data.cmpPlayer.GetCheatsEnabled()) + return; + var cmpGuiInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface); cmpGuiInterface.PushNotification({ "type": "aichat",