mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:29:50 +00:00
revert 6e0e607b20 as it prevented to open the developper overlay in autostart games
This was SVN commit r17288.
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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)"});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user