Fix turn persistence on return from practice.
This commit is contained in:
parent
f975e723a7
commit
9d65579fd9
@ -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));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user