generated from nhcarrigan/template
fix: use server-computed endsAt for exploration timer to prevent clock drift
Exploration timers were showing more time than the area's stated duration when the server clock was ahead of the client clock. The timer now uses the server-provided endsAt timestamp directly instead of deriving startedAt from it, making countdowns immune to client/server clock skew. Old saves without endsAt fall back to the previous startedAt-based calculation. Closes #53
This commit is contained in:
@@ -72,6 +72,12 @@ interface ExplorationAreaState {
|
||||
*/
|
||||
startedAt?: number;
|
||||
|
||||
/**
|
||||
* Unix timestamp when the exploration will complete (server-computed, used for
|
||||
* accurate client-side countdown that is immune to client/server clock drift).
|
||||
*/
|
||||
endsAt?: number;
|
||||
|
||||
/**
|
||||
* True after the first successful collect — used for codex unlock detection.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user