-
Notifications
You must be signed in to change notification settings - Fork 494
fix: clusters bypass shields in shield rework #6277
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
base: master
Are you sure you want to change the base?
fix: clusters bypass shields in shield rework #6277
Conversation
What incorrect info does engine provide? Isn't clusters going through shields because a cluster that explodes on a shield surface spawns submunitions inside the bubble? |
That remark is not about the clusters but the power remaining, for overpen. In the shields rework, damage to shields is collected in a |
because the shield rework "covers" units until then and waits to apply shield damage until then which is an odd detail tbh: an infinite sub-frame hp pool
cludgy but it is what is is at this point
We want to stop using the engine API for shield data since our shield implementation is increasingly departing from the way the engine works.
We are still detecting shield hits only on direct contact, so this code, effectively, ignores shields that are a tiny distance away from a direct hit. This still causes some cluster shots to sneak through. I think this is a "sufficient" solution and gives good performance but I'll likely sweep through in a couple months once it bothers me enough and revamp hit detection.
This adds better support for shields to handle projectiles and removes some mysteriousness to how they are handled. I've excluded lightning sparks specifically since they deny their ownerID (it is always -1) and how would lightning know who's who, anyway (how, indeed, would any projectile know its own team, but whatever).
3fd1674 to
a06fa99
Compare
Work done
Addresses Issue(s)
From tests by OmicronMkI, clusters weren't treating non-repulsing shields as solid surfaces, so sometimes would bypass shields:
Test steps
/luarules fightertest legacluster corgate 10 1 2400Recording of that fightertest: https://discord.com/channels/549281623154229250/1063217502898884701/1441274985896480808
In addition, verify that overpen works the same as before. Railguns are LaserCannons so are not intercepted by shields normally. You have to give a t3 shield or enable the modoption to intercept all projectiles from advanced options.
I've done these steps and things seem to be working.