-
Notifications
You must be signed in to change notification settings - Fork 161
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
Fix a bug where shields could occasionally be pierced #3448
Conversation
It is a definite bug. It's just a balance affecting bug... So even though it was never intended, it may be better to put it behind a |
I concur. We have put less obvious bugs behind flags. I would add it to ai_profiles and then set the flag to be automatically activated for 21.4+, similar to several other ai_profiles flags. |
I figured as much, although I'd prefer to avoid putting this in ai_profiles since it is not AI related, in lieu of something like game_settings similar to |
AI_Profiles probably should have had a different name from the beginning. But the main difference between ai_profiles and game_settings is that ai_profiles can be changed on a per-mission basis, while game_settings applies mod-wide. Therefore, a lot of flags affecting balance have been added to ai_profiles. This allows missions created before the flag to use the old setting, while missions created after the flag can use the new setting. (Scroll uses this a lot because of its long development history.) |
14bf9d9
to
d61a975
Compare
Fair enough, I thought 'fixed turret collisions' was under target version, but apparently not. And ai_profiles already other not really AI-related stuff anyway.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that this is the best name that I can think of, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM too.
...despite full shields in that quadrant. If the ship moves towards the weapon in the frame, the next collision check for the weapon may start it inside the shield where last frame it may have ended just outside the shield. By adding in the ship's velocity we essentially take into account the apparent motion of the weapon from the ship's own moving reference frame. This was tested and works with regular and highly adversarial examples, such as very slow moving weapons which are normally very difficult to actually trigger collisions against for this reason.
The bigger issue, however, is backwards compatibility. I think almost everyone has noticed this happen at some point or another, and although I haven't specifically tested for it, I highly suspect this is the reason Seraphim and Nephilim bombers can occasionally be destroyed in a single volley of trebuchets, despite the stats on the paper not allowing for this. This could be behind a flag (possibly enabled by
$Target version
) but I am loathe to do this because of how simple, clearly a bug, and fundamental this is to the collision system.