Files
OpenRA/mods/d2k/weapons/debris.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

73 lines
1.3 KiB
YAML

Debris:
ReloadDelay: 60
Range: 2c768
Projectile: Bullet
Speed: 32, 64
Blockable: false
LaunchAngle: 128, 192
Inaccuracy: 1c256
Image: shrapnel
Shadow: true
BounceCount: 3
BounceRangeModifier: 20
Warhead@1Dam: SpreadDamage
Spread: 320
Falloff: 100, 60, 30, 15, 0
Damage: 1500
Versus:
none: 20
wall: 50
building: 50
wood: 60
light: 100
heavy: 75
concrete: 100
invulnerable: 0
cy: 20
harvester: 50
DamageTypes: Prone50Percent, TriggerProne, SmallExplosionDeath
Warhead@2Smu: LeaveSmudge
SmudgeType: SandCrater
InvalidTargets: Vehicle, Structure
Warhead@3Eff: CreateEffect
Explosions: tiny_explosion
ImpactActors: false
Debris2:
Inherits: Debris
Projectile: Bullet
Image: shrapnel2
TrailImage: small_trail
TrailPalette: effect75alpha
TrailInterval: 1
Warhead@1Dam: SpreadDamage
Damage: 2500
Versus:
none: 90
wall: 5
building: 65
wood: 50
light: 40
heavy: 30
concrete: 100
invulnerable: 0
cy: 20
harvester: 25
DamageTypes: Prone50Percent, TriggerProne, ExplosionDeath
Warhead@3Eff: CreateEffect
Explosions: small_napalm
Debris3:
Inherits: Debris2
Projectile: Bullet
Image: shrapnel3
TrailImage: small_trail2
Warhead@1Dam: SpreadDamage
Damage: 1500
Debris4:
Inherits: Debris2
Projectile: Bullet
Image: shrapnel4
TrailImage: large_trail