Skip to content

fix: pest roof-AOTV freeze and camera level-out#50

Draft
nnasko wants to merge 1 commit into
mizly:mainfrom
nnasko:fix/pest-roof-aotv-camera
Draft

fix: pest roof-AOTV freeze and camera level-out#50
nnasko wants to merge 1 commit into
mizly:mainfrom
nnasko:fix/pest-roof-aotv-camera

Conversation

@nnasko

@nnasko nnasko commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Freeze fix: completeRoofAotv() is the only way out of the AOTV_TO_ROOF state, and some callers wrap it in catch (Throwable). The camera level-out added for the hand-off could throw and get swallowed, silently stalling the pest destroyer (seen when a plot had open sky above the landing spot). The level-out is now isolated in its own guarded block so it can never prevent the state transition, and logs the error if it ever fires.
  • Camera level-out: after the roof AOTV climb the camera is craned ~88° up to warp through the roof and never reset. It's now smoothly returned to horizontal before the bot moves toward pests, and only runs when the pitch is actually steep.

Testing

Verified in-game: a plot with no roof no longer freezes the destroyer, and the camera levels out after the roof climb instead of moving off craned upward.

- completeRoofAotv() no longer freezes the destroyer: the cosmetic camera
  level-out is wrapped so a throw can never block the state transition, which
  is the only exit from AOTV_TO_ROOF (a swallowed throwable silently stalled the
  destroyer when a plot had no roof).
- After the roof climb the camera is levelled from its ~88-degree crane back to
  horizontal before moving toward pests, so the hand-off no longer looks robotic.
@nnasko
nnasko marked this pull request as draft July 24, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant