Skip to content

Conversation

@efrec
Copy link
Collaborator

@efrec efrec commented Nov 20, 2025

Work done

  • Provide replacement shield API for game-side shields (rather than asking engine for some incorrect info)
  • Retain some shield info until the end of the frame, since unit coverage from AOE lasts until then
  • Make overpen and cluster projectile behaviors use the new shield info when rework is enabled
  • Finally, treats shields as hard surface geometry in cluster munition's surface response code
  • Decreased the initial scatter of clusters a very small amount to look nice w/ shield scatter

Addresses Issue(s)

From tests by OmicronMkI, clusters weren't treating non-repulsing shields as solid surfaces, so sometimes would bypass shields:

Test steps

  • Enable Legion and repeat the below steps with the Shield Rework enabled/disabled
  • give a resourcecheat to the other team
  • /luarules fightertest legacluster corgate 10 1 2400
  • cluster shots should bounce away correctly from shields

Recording 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.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 20, 2025

Test Results

14 tests  ±0   7 ✅ ±0   9s ⏱️ ±0s
 1 suites ±0   7 💤 ±0 
 1 files   ±0   0 ❌ ±0 

Results for commit 3bb9738. ± Comparison against base commit 4775215.

♻️ This comment has been updated with latest results.

@sprunk
Copy link
Collaborator

sprunk commented Nov 20, 2025

rather than asking engine for some incorrect info

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?

@efrec
Copy link
Collaborator Author

efrec commented Nov 20, 2025

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 shieldDamage value and applied all at once at the start of the next game frame. So the actual power remaining, to BAR, is not the shield power that the engine reports.

@efrec efrec changed the title Fix-cluster-shield-bypass-in-rework fix: clusters bypass shields in shield rework Nov 20, 2025
efrec added 6 commits November 21, 2025 13:46
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).
@efrec efrec force-pushed the fix-cluster-shield-bypass-in-rework branch from 3fd1674 to a06fa99 Compare November 21, 2025 18:57
@efrec efrec marked this pull request as ready for review November 21, 2025 19:17
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

Successfully merging this pull request may close these issues.

2 participants