Ticket #2595: cheats_patch.diff

File cheats_patch.diff, 950 bytes (added by Jia Henry, 10 years ago)

The svn diff of my patch

  • binaries/data/mods/public/gui/gamesetup/gamesetup.js

     
    275275        {
    276276            // Update attributes so other players can see change
    277277            g_GameAttributes.settings.CheatsEnabled = this.checked;
     278            if (this.checked)
     279            {
     280                g_GameAttributes.settings.RatingEnabled = false;
     281                Engine.SetRankedGame(false);
     282            }
    278283            if (!g_IsInGuiUpdate)
    279284                updateGameAttributes();
    280285        };
     
    282287        Engine.GetGUIObjectByName("enableRating").onPress = function()
    283288        {
    284289            // Update attributes so other players can see change
     290            if (this.checked)
     291                g_GameAttributes.settings.CheatsEnabled = false;
    285292            g_GameAttributes.settings.RatingEnabled = this.checked;
    286293            Engine.SetRankedGame(this.checked);
    287294            if (!g_IsInGuiUpdate)