Open menonsamir opened 1 year ago
I think that Fencing is currently breaking in some cases because the clock.trueTotalTime property on the game object is missing from the server-initialized game state. In server/model/game.ts#L67:
clock.trueTotalTime
clock: { lastUpdated: 0, totalTime: 0, paused: true, }
A bunch of other code assumes that the trueTotalTime property is already initialized. Specifically, in src/lib/wrappers/HistoryWrapper.js#L114:
trueTotalTime
event.gameTimestamp = this.getSnapshotAtIndex(insertPoint).clock.trueTotalTime;
I think a one-line addition of trueTotalTime: 0 to addInitialGameEvent would fix it, though I haven't tested it.
trueTotalTime: 0
addInitialGameEvent
oh yeah good catch. will look into it next time i have a chance
I think that Fencing is currently breaking in some cases because the
clock.trueTotalTime
property on the game object is missing from the server-initialized game state. In server/model/game.ts#L67:A bunch of other code assumes that the
trueTotalTime
property is already initialized. Specifically, in src/lib/wrappers/HistoryWrapper.js#L114:I think a one-line addition of
trueTotalTime: 0
toaddInitialGameEvent
would fix it, though I haven't tested it.