Ticket #3435: t3435_fix_player_assignments_in_replays_v1.patch

File t3435_fix_player_assignments_in_replays_v1.patch, 1.4 KB (added by elexis, 9 years ago)

Fix both!

  • binaries/data/mods/public/gui/replaymenu/replay_actions.js

    function reallyStartVisualReplay(replayD  
    2424    // TODO: enhancement: restore filter settings and selected replay when returning from the summary screen.
    2525    Engine.StartVisualReplay(replayDirectory);
    2626    Engine.SwitchGuiPage("page_loading.xml", {
    2727        "attribs": Engine.GetReplayAttributes(replayDirectory),
    2828        "isNetworked" : false,
    29         "playerAssignments": {},
     29        "playerAssignments": {
     30            "local":{
     31                "name": translate("You"),
     32                "player": -1
     33            }
     34        },
    3035        "savedGUIData": "",
    3136        "isReplay" : true
    3237    });
    3338}
    3439
  • binaries/data/mods/public/gui/session/session.js

    function init(initData, hotloadData)  
    159159
    160160        Engine.GetGUIObjectByName("gameSpeedButton").hidden = g_IsNetworked;
    161161    }
    162162    else // Needed for autostart loading option
    163163    {
     164        if (g_IsReplay)
     165            g_PlayerAssignments.local.player = -1;
     166
    164167        g_Players = getPlayerData(null);
    165168    }
    166169
    167170    // Cache civ data
    168171    g_CivData = loadCivData();