fix(cockpit): a stalled water read is given up, and coarse reads only raise

Before the first full-detail read lands, a loaded-tile read could still
lower a river height partway (27 m to a 15 m bank). Loaded-tile reads now
only raise it; lowering is the full-detail read's to say.

That makes a full read that never lands (stalled tile requests) hold a
wrong height for the whole bridge, so one still running after 30 s is given
up for a fresh one; its late answer is dropped.

Also tests the other half of the double-click memory fix: another ship
selected within the memory is not entered through the first ship's spot.
This commit is contained in:
Sameh Khamis committed 2026-11-08 14:09:18 -08:00
1 parent 80a33ba52c
commit 1bc4f980e0
4 files changed
+110 -17

No files matched your search

+7
View File
@@ -38,6 +38,13 @@ export const VESSEL_WATERLINE_PROBE_COUNT = 8;
/** How often the bridge reads the water under its ship again, ms. */
export const VESSEL_WATERLINE_REFRESH_MS = 5000;
/**
* A full-detail water read still running after this long is given up and
* a fresh one started, ms: tile requests can stall, and one read that never
* lands would otherwise hold the height for the rest of the bridge.
*/
export const VESSEL_WATERLINE_READ_TIMEOUT_MS = 30000;
/** A surface less than this above sea level is the sea itself, metres. */
export const VESSEL_WATERLINE_MIN_RISE_M = 2;