store game hashes on singleplayer

This commit is contained in:
Evan
2025-03-14 15:48:25 -07:00
parent 2dd0c56583
commit 67c1ff2158
+3 -1
View File
@@ -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(