Files
OpenRA/mods/cnc/weapons/ballistics.yaml
Alexis Hunt 08ad7d7f4e Refactor handling of hit radii in projectiles.
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.
2018-02-21 23:26:41 +01:00

110 lines
1.9 KiB
YAML

^BallisticWeapon:
ReloadDelay: 40
Range: 4c768
Report: tnkfire6.aud
Projectile: Bullet
Image: 120MM
Speed: 682
Shadow: true
Warhead@1Dam: SpreadDamage
Spread: 128
Damage: 4000
Versus:
None: 25
Wood: 100
Light: 100
Heavy: 100
DamageTypes: Prone50Percent, TriggerProne, ExplosionDeath
Warhead@2Smu: LeaveSmudge
SmudgeType: Crater
InvalidTargets: Vehicle, Structure, Wall, Husk, Trees, Creep
Warhead@3Eff: CreateEffect
Explosions: small_frag
ImpactSounds: xplos.aud
ImpactActors: false
70mm:
Inherits: ^BallisticWeapon
ReloadDelay: 30
Range: 4c0
Report: tnkfire3.aud
Projectile: Bullet
Speed: 853
Warhead@1Dam: SpreadDamage
Damage: 2500
Versus:
None: 24
Wood: 72
Light: 100
Heavy: 88
120mm:
Inherits: ^BallisticWeapon
120mmDual:
Inherits: ^BallisticWeapon
Burst: 2
BurstDelays: 8
TurretGun:
Inherits: ^BallisticWeapon
ReloadDelay: 20
Range: 6c0
Projectile: Bullet
Speed: 853
Warhead@1Dam: SpreadDamage
Versus:
None: 20
Wood: 25
Light: 100
Heavy: 100
ArtilleryShell:
Inherits: ^BallisticWeapon
ReloadDelay: 65
Range: 11c0
MinRange: 3c0
Report: tnkfire2.aud
TargetActorCenter: true
Projectile: Bullet
Speed: 204
Blockable: false
LaunchAngle: 56
Inaccuracy: 1c256
ContrailLength: 30
Warhead@1Dam: SpreadDamage
Spread: 341
Damage: 10000
Versus:
None: 150
Wood: 120
Light: 112
Heavy: 75
DamageTypes: Prone50Percent, TriggerProne, SmallExplosionDeath
Warhead@3Eff: CreateEffect
Explosions: poof
ImpactSounds: xplosml2.aud
Grenade:
Inherits: ^BallisticWeapon
ReloadDelay: 50
Range: 4c0
Report: toss1.aud
Projectile: Bullet
Speed: 140
Blockable: false
LaunchAngle: 62
Inaccuracy: 813
Image: BOMB
Warhead@1Dam: SpreadDamage
Spread: 341
Damage: 5000
Versus:
None: 100
Wood: 50
Light: 80
Heavy: 34
DamageTypes: Prone50Percent, TriggerProne, SmallExplosionDeath
Warhead@3Eff: CreateEffect
Explosions: small_poof