Ticket #3155: developer-overlay-only-with-cheats.patch

File developer-overlay-only-with-cheats.patch, 916 bytes (added by elexis, 9 years ago)
  • binaries/data/mods/public/gui/session/menu.js

     
    658658
    659659function toggleDeveloperOverlay()
    660660{
    661     // The developer overlay is disabled in ranked games
    662     if (Engine.HasXmppClient() && Engine.IsRankedGame())
     661    // Disable developer overlay if cheats are inactive
     662    if (!g_Players[Engine.GetPlayerID()].cheatsEnabled)
    663663        return;
    664664
    665665    var devCommands = Engine.GetGUIObjectByName("devCommands");
     
    667667        submitChatDirectly(translate("The Developer Overlay was opened."));
    668668    else
    669669        submitChatDirectly(translate("The Developer Overlay was closed."));
     670
    670671    // Toggle the overlay
    671672    devCommands.hidden = !devCommands.hidden;
    672673}