Open GoogleFrog opened 1 month ago
otherwise hitting a shield is indistinguishable from exploding mid-air
But shields are usually visible, aren't they? Why is it indistinguishable then?
The CEG can't distinguish. For example consider ZK nuke with tags for subcomponents like
BIG_MUSHROOM = { -- successful hit
unit = true,
ground = true,
-- shield = true, -- doesn't exist
air = false,
particles = blabla,
},
JUST_A_LOT_OF_FAILED_SMOKE = { -- intercepted mid-air by anti
unit = false,
ground = false,
-- shield = false, -- doesn't exist
air = true,
particles = blabla,
}
Now when it hits a shield, the CEG thinks it exploded mid-air and uses the failed "intercepted by anti" smoke instead of a proper mushroom cloud even though it's a successful hit.
CEGS have the boolean flags air, unit, ground, water etc.. to let the ceg appear or not depending on what is at its spawn location. If the weapon that spawned the ceg hits a unit, and the ceg has unit=true, then the ceg is drawn.
I would like a shield flag, for cegs spawned by weapons that hit shields, because otherwise hitting a shield is indistinguishable from exploding mid-air. The flag would not have to do some expensive test for a nearby shield boundary, it would be fine if shield were only set for weapons that explode on shields, as that information is already known. I don't know exactly how flags like unit interact with underwater, but shield should probably have the same interactions as unit, since both unit and shield involve hitting a barrier in the world, rather than a terrain situation.