Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starports sometimes push each other around #535

Open
IsaacLic opened this issue Jul 17, 2020 · 0 comments
Open

Starports sometimes push each other around #535

IsaacLic opened this issue Jul 17, 2020 · 0 comments

Comments

@IsaacLic
Copy link
Contributor

When there are several systems, Starports sometimes end up too close to each other. When that happens, they'll both get moved away from each other, which often can cause them to swing wildly, possibly sending the player flying. Presumably, they shouldn't do that.

When the Starport is still a FarObject, it moves to be as close as possible to the other planet or system, the same way that it does as a SolObject. However, once it becomes a SolObject (because the player moved close enough), it starts checking to see if another starport is nearby. Since they can now overlap, the starports move to ensure that they aren't touching. In the current code, they immediately move far enough away that they aren't touching the other starport. Since each starport is suddenly moving, it can crash into the player, sending the ship flying. If it overlaps with a Starport on the other side, it can also bounce back and forth between the two.

How to reproduce

  • Start a new game with several systems. The more there are, the easier this is to reproduce.
  • Take starports to a system near the edge, so that several starports link to systems that are approximately lined up. (This will cause the starports to become close to each other.)
  • When the player gets close, if the starports are close enough, they should shake wildly. If not, fly away and try again.
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

No branches or pull requests

1 participant