revert 6e0e607b20 as it prevented to open the developper overlay in autostart games

This was SVN commit r17288.
This commit is contained in:
mimo 2015-11-19 22:28:30 +00:00
parent 0b2da13dea
commit 3cbbf31173
2 changed files with 3 additions and 11 deletions

View file

@ -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");

View file

@ -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)"});