Skip to content

Fix player being unable to collide with Stations if only ship in Frame - #5720

Merged
sturnclaw merged 1 commit into
pioneerspacesim:masterfrom
sturnclaw:fix-starport-physics
Jan 23, 2024
Merged

Fix player being unable to collide with Stations if only ship in Frame#5720
sturnclaw merged 1 commit into
pioneerspacesim:masterfrom
sturnclaw:fix-starport-physics

Conversation

@sturnclaw

Copy link
Copy Markdown
Member

The CollisionSpace partition sort algorithm had a degenerate case where the contents of a single-element array would always be assigned to the disabled bucket, regardless of if it was enabled or not. This resulted in the player being unable to collide with any static Geom if it was the only active ship in the physics frame.

I've fixed that, and in the process made the sort algorithm a bit simpler.

Fixes #5705. Note that the saves linked in that issue are not compatible with the current master branch.

- Partition sort had a degenerate case where 1 element in the array would always be assigned to the disabled bucket, regardless of if it passed the partitioning test.
- The fix also makes the sort logic generally simpler as a side benefit.
@sturnclaw
sturnclaw merged commit c747d5d into pioneerspacesim:master Jan 23, 2024
@sturnclaw
sturnclaw deleted the fix-starport-physics branch January 29, 2024 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Passing through landing pad during landing

1 participant