Repository navigation
Conversation
…se docking with self DockingSystem::update only reset the dock state when the target was removed mid-dock, leaving the impulse request at -1 (ship keeps reversing). Use abortDock. requestDock had no target == entity guard (lost in the ECS port, was daid#1906). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1903.
Two small fixes in
src/systems/docking.cpp:DockingSystem::update, stateDocking: when the target is gone or has noTransform, onlystatewas reset toNotDocking. The impulse request set a tick earlier (-1) stayed, so the ship kept reversing. It now callsabortDock(entity), which also zeroes impulse and warp requests and stops the thrusters, as the manual abort path does.requestDock: addtarget == entityto the early return. The oldrequestDockhadtarget == this([SpaceShip] Don't try to dock with yourself #1906); the ECS port lost it. Only matters for an entity that has its ownDockingBay(a stock Atlantis has none, so it cannot dock to itself).Measured (headless, one scenario,
commandDockthenstation:destroy()1 s later)29df4600(control)components.docking_bay = {}docks itselfcommandDock(p, p))Regression run (90 s simulated): a player Atlantis and an AI Phobos both reach
dockedon master and on this branch. An AI ship whose station is destroyed mid-dock endsnot_dockingon both (the AI re-issues its own impulse each tick, so single samples there are noise).Docked state (station destroyed 2 s after the ship reports
docked; player and AI): identical on master and this PR. Playerdocked->not_docking, impulse 0.0, no drift. AIdocked->not_dockingand flies off (it sets its own impulse each tick). TheDockedbranch is untouched by this PR.GUI check (Windows, this PR's build, Helms screen): Atlantis docking at impulse -19%, station destroyed 2 s later; impulse went to -9%, then 0% (speed 0.0), and the Request dock button became available again.
Build checks: built locally (MSVC, RelWithDebInfo, Windows). No other platform built. No scenario smoke needed (no scripts changed).
Not tested
dockingButton.cpp); only scriptcommandDockreaches that path, covered headless above.🤖 Generated with Claude Code