Skip to content

Stationary jump types should not try to avoid collision #6738

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

Merged

Conversation

Baezon
Copy link
Member

@Baezon Baezon commented May 28, 2025

A.k.a. homeworld-style jumps, bsg-style jumps, etc. They do not need to move, so there is no need to try and avoid any collisions.

Also rearranges the star wars hypserspace collision check (previously, if the 'short distance' check succeeded, then it would've skipped the 'long distance' check for hyperspace). Since this check did not work, and some mods may be relying on it not working, we've opted to simply remove it.

@Baezon Baezon added fix A fix for bugs, not-a-bugs, and/or regressions. gameplay A feature or issue that can significantly impact gameplay ai A feature or issue related to the AI algorithms labels May 28, 2025
@wookieejedi
Copy link
Member

wookieejedi commented May 28, 2025

Oh nice! Does this mean that if a collision is detected in the hyperspace path long check, then it will try and go around?

Quick question, would it be possible to put the hyperspace jump style check behind a scripting flag (or an AI flag)? There are sometimes in FotG we want something to try and hyper out even if a ship is in the way :D Currently we have a script that does the actual checking logic, then tells the ship to jump if the ray check clears or tells the ship to jump in special situations even when another ship is in the way.

@Baezon
Copy link
Member Author

Baezon commented May 28, 2025

If fotg is relying on that check basically not working at all then, perhaps it should simply be removed?

@MjnMixael
Copy link
Contributor

BtA also uses the hyperspace jump type and I'd be curious if the new additional check might cause jump failures where previously that wasn't a concern?

@Baezon
Copy link
Member Author

Baezon commented May 28, 2025

The jump wouldn't fail the ship would just turn to try and find a clear vector but either way, if mods are relying on this check not working (which I have now confirmed it is not) then I'm going to remove it unless anyone else disagrees.

After discussing a bit more with wookiee we decided it would be better to keep FotG's current script implementation, rather than restore and toggle the engine's implementation of this kind of behavior. Something like it and more configurable could always be implemented in-engine later.

@MjnMixael
Copy link
Contributor

Ah that sounds good to me. Thanks for clarifying. 👍

Copy link
Member

@wookieejedi wookieejedi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Straightforward and good clean-up

@wookieejedi wookieejedi merged commit 7502cf3 into scp-fs2open:master Jun 3, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai A feature or issue related to the AI algorithms fix A fix for bugs, not-a-bugs, and/or regressions. gameplay A feature or issue that can significantly impact gameplay
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants