From 67c1ff21583d4f95c4b96cf017b325231db74246 Mon Sep 17 00:00:00 2001 From: Evan Date: Fri, 14 Mar 2025 15:48:25 -0700 Subject: [PATCH] store game hashes on singleplayer --- src/client/LocalServer.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/LocalServer.ts b/src/client/LocalServer.ts index 333ade8ba..0a6885543 100644 --- a/src/client/LocalServer.ts +++ b/src/client/LocalServer.ts @@ -93,9 +93,11 @@ export class LocalServer { } if (clientMsg.type == "hash") { if (!this.lobbyConfig.gameRecord) { - // Don't do hash verification on singleplayer games. + // If we are playing a singleplayer then store hash. + this.turns[clientMsg.turnNumber].hash = clientMsg.hash; return; } + // If we are replaying a game then verify hash. const archivedHash = this.turns[clientMsg.turnNumber].hash; if (!archivedHash) { console.warn(