penev discovered that the RulesetLoaded functions of projectiles were
never being called, meaning that their blocking calculations were not
properly accounting for actors with large hitboxes.
The best fix for this is to change FindActorsOnLine to always account
for the largest actor's hit radius, rather than forcing callers to pass
the largest radius. Per the comment in Util.cs, as a result, move this
computation to ActorMap. I decided to simplify by not making a separate
calculation for actors that block projectiles only; this may cause a
small performance degradation as the search space is a bit larger.
Similarly to this, I've removed the ability to specify a search radius
manually. Because this is only a search radius, setting a value smaller
than the largest eligible actor makes no sense; that would lead to
completely inconsistent blocking. Setting a larger value, on the other
hand, would make no difference.
CreateEffectWarhead was the only place in core code any of these search
radii were set, and that's because 0 was a mysterious magic value that
made the warhead incapable of hitting actors. I replaced it with a
boolean flag that more clearly indicates the actual behaviour.
Fixes#14151.
There were two issues at work here:
1) The combination of default MaximumLaunchAngle and default CruiseAltitude made torpedoes fly a ballistic curve, which combined with BoundToTerrain type made them explode 'in the air' when hitting non-water tiles. This would result in AIr returned as target type, which is invalid for torpedoes.
2) The explosion warheads were missing the Ground target type, which is actually the (only) target type that the bridge tiles you hit with torpedoes have.
On bleed, both the explosion as well as the water splash warhead of weapons triggered on bridges, since they have both the Ground and Water target types.
Ground cannot be made invalid for water splashes without causing regressions elsewhere, so a new Bridge target type is introduced to explicitly make bridges invalid targets for water splash effect warheads.
- increased ammo per gun from 9 to 10, for two full double-5-burst salvoes, adjusted ReloadDelay to keep total reload time about the same
- increased Spread by 33% to make up for lower effective pin-point accuracy
- increased damage vs. infantry by 25%, vs. light armor by 16.67%, vs. heavy armor by ~10%
This fixes the following issues:
- units like mammoth tanks sometimes at first only fired 1 shot on new encounter because they only depleted 1 burst before previous target was killed
- weapons that use strafing logic would not reset the offset multiplier after passing the target once, leading to wrong offsets on following attacks