H15: Re-check the underwater murk whenever the camera moves

MatchView.setup() syncs with the camera at the origin, which is under the sea
once it has risen, and nothing re-checked the murk when the camera was then
placed. Captures of the late match (match_tide, match_final, match_results)
came out as flat teal, and in the game every camera cut showed one frame of
the wrong murk, since ClientSession syncs before moving the camera.

_focus(), which every camera placement calls, now applies the weather again
for the camera's new position. Test: a view under a risen sea, moved with no
sync, follows the camera in and out of the murk.

Closes #84

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-14 15:08:54 -05:00
co-authored by Claude Opus 5.5
parent 437f078bb2
commit 4bc2171b01
2 changed files with 22 additions and 0 deletions
+6
View File
@@ -182,6 +182,12 @@ func settle() -> void:
terrain.build_all_now()
## Called whenever the camera moves. The weather's murk is decided by where the camera
## is, so it is checked again here: a view placed after its last sync() (a capture, or
## the frame a spectator's camera cuts to the island) would otherwise keep the murk of
## wherever the camera was before, the origin under the sea at first (H6).
func _focus() -> void:
if terrain != null:
terrain.focus = camera.position
if weather != null and sim != null:
weather.apply(weather.weather, camera.transform.origin)