Fix turn persistence on return from practice.

This commit is contained in:
yukirij 2024-10-05 13:04:19 -07:00
parent f975e723a7
commit 9d65579fd9

View File

@ -599,6 +599,7 @@ const SCENES = {
switch(code) { switch(code) {
case OpCode.SessionView: { case OpCode.SessionView: {
if(data.status == Status.Ok) { if(data.status == Status.Ok) {
console.log(this.turn);
LOAD(SCENES.Game, { LOAD(SCENES.Game, {
mode:this.mode, mode:this.mode,
token:this.token, token:this.token,
@ -717,7 +718,7 @@ const SCENES = {
// Interface // Interface
INTERFACE.init(data.token, data.mode); INTERFACE.init(data.token, data.mode);
if(data.turn !== null) { if(data.turn !== null) {
INTERFACE_DATA.replay_turn = data.turn; INTERFACE_DATA.Replay.turn = data.turn;
} }
history.pushState(null, "Dzura - Game", "/game/" + PACK.base64(data.token).slice(0, -1)); history.pushState(null, "Dzura - Game", "/game/" + PACK.base64(data.token).slice(0, -1));