summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-02-28 12:26:10 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-28 12:27:56 +0100
commite4570f4a14f055c87c0647c97fe408535ae676ff (patch)
treed7028682f10bd73bd9019351b013bd57820e5e49 /public
parent10d420bba43827d9814fb3c55c13983339ac6e70 (diff)
downloadserver-e4570f4a14f055c87c0647c97fe408535ae676ff.tar.gz
Fixup for optimize replay.
Diffstat (limited to 'public')
-rw-r--r--public/common/play.js8
1 files 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() {