From e4570f4a14f055c87c0647c97fe408535ae676ff Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 28 Feb 2023 12:26:10 +0100 Subject: Fixup for optimize replay. --- public/common/play.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/common/play.js b/public/common/play.js index 77fcaab..9676476 100644 --- a/public/common/play.js +++ b/public/common/play.js @@ -944,7 +944,7 @@ async function init_replay() { if (document.querySelector("body").classList.contains("shift")) { view.prompt = `[${p}/${replay.length}] ${s.active} / ${s.state}` if (p < replay.length) - view.prompt += ` / ${replay[p].action} ${replay[p].arguments}` + view.prompt += ` / ${replay[p][1]} ${replay[p][2]}` } else { view.prompt = "[" + p + "/" + replay.length + "] " + view.prompt } @@ -1013,10 +1013,12 @@ window.addEventListener("load", function () { zoom_map() if (params.mode === "debug") init_replay() - if (params.mode === "replay") + else if (params.mode === "replay") init_replay() - if (params.mode === "play") + else if (params.mode === "play") connect_play() + else + document.getElementById("prompt").textContent = "Invalid mode: " + params.mode }) function init_main_menu() { -- cgit v1.2.3