Skip to content

Carrier and Fighters: keep update() running with fighters in the hangar - #2909

Open
dj803 wants to merge 1 commit into
daid:masterfrom
dj803:pr/carrier-fighters-hangar
Open

dj803 wants to merge 1 commit into
daid:masterfrom
dj803:pr/carrier-fighters-hangar

Conversation

@dj803

@dj803 dj803 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

When a fighter docks inside the carrier, docking.cpp removes its Transform. getPosition() then returns nothing, and distance() errors in closestPlayerTo and farthestPlayerFrom. Five errors in a row stop update() for the rest of the game, which happens as soon as a fighter docks.

Also:

  • the freighter cargo list read comms_target.goods (nil); the guard just above it uses comms_target.comms_data.goods
  • carrier custom-button cleanup, reputation bumps and doNotPush skip a destroyed carrier or player ship

Testing: an automated headless run had update() stop. After the fix it flew without errors. The cargo typo error appeared when asking a freighter "Where are you headed?".

🤖 Generated with Claude Code

A fighter docked inside the carrier has no Transform (docking.cpp removes
it on internal docking), so getPosition() returns nothing and distance()
errors in closestPlayerTo/farthestPlayerFrom. Five such errors in a row
stop update() for the rest of the game, which happens as soon as a
fighter docks - the scenario's own setup.

Also:
- freighter cargo list read comms_target.goods (nil); the guard and the
  other uses say comms_target.comms_data.goods
- carrier custom-button cleanup, reputation bumps and doNotPush skip a
  destroyed carrier/player ship (destroyed entities keep only isValid)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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