player_ship:commandDock(station) triggers docking procedure even when out of range
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 869
- Forks
- 222
- Avg merge
- 18h 33m
- Merged PRs (30d)
- 1
Description
When you trigger player_ship:commandDock(station) when the station is far away from you, it creates interesting side effect of automatically turning on impulse to 100% reverse no matter where behind you the station was. In my example it was around player ship's 145 degrees, where zero degrees is player ship's current heading.
I think the distance check should be not only in GUI but also in the EE logic itself. Either don't execute it at all, or when you do, then at least start the maneuver completely (full reverse and turn ship's aft section directly at target station). But this behaviour is confusing and weird. From my point of view, part of the code worked (impulse part) and part did not (steering part).
Oznogon's response from Discord:
I think the distance check should be not only in GUI but also in the EE logic itself.
The command function just sends a packet that results in a call to SpaceShip:requestDock(), which should have a range limit:
if (glm::length(getPosition() - target->getPosition()) > 1000 + target->getRadius())
return;
So that might be broken.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the player_ship:commandDock(station) entry point and trace the packet to SpaceShip:requestDock(), including the shown range check. Reproduce an out-of-range docking request with the station behind the ship and inspect the impulse and steering state. Done means the request no longer leaves the maneuver partially applied, with the intended out-of-range behavior decided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, lua
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100