Files
OpenRA/mods/cnc/weapons/smallcaliber.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

166 lines
2.7 KiB
YAML

Sniper:
Report: ramgun2.aud
ValidTargets: Ground, Infantry
InvalidTargets: Vehicle, Water, Structure, Wall, Husk
ReloadDelay: 40
Range: 8c0
Projectile: Bullet
Speed: 5c682
Warhead@1Dam: SpreadDamage
Spread: 42
Damage: 10000
ValidTargets: Infantry
DamageTypes: Prone50Percent, TriggerProne, BulletDeath
^HeavyMG:
ReloadDelay: 25
Range: 6c0
Report: gun8.aud
Projectile: Bullet
Speed: 1c682
Warhead@1Dam: SpreadDamage
Spread: 683
Damage: 3000
Versus:
None: 100
Wood: 50
Light: 70
Heavy: 30
DamageTypes: Prone50Percent, TriggerProne, BulletDeath
Warhead@2Eff: CreateEffect
Explosions: piffs
ImpactActors: false
ValidTargets: Ground, Water, Air
HighV:
Inherits: ^HeavyMG
Vulcan:
Inherits: ^HeavyMG
Range: 8c0
Burst: 9
BurstDelays: 2
FirstBurstTargetOffset: -2984,0,0
FollowingBurstTargetOffset: 746,0,0
ReloadDelay: 125
Report: gun5.aud
Warhead@1Dam: SpreadDamage
Spread: 426
Damage: 10000
Versus:
Wood: 15
Light: 100
Heavy: 35
HeliAGGun:
Inherits: ^HeavyMG
ReloadDelay: 20
Burst: 2
BurstDelays: 0
Range: 4c0
MinRange: 0c768
Report: gun5.aud
Projectile: Bullet
Blockable: false
Warhead@1Dam: SpreadDamage
Spread: 256
Damage: 2000
Versus:
None: 100
Wood: 50
Light: 75
Heavy: 25
HeliAAGun:
Inherits: HeliAGGun
ValidTargets: Air
Warhead@1Dam: SpreadDamage
Spread: 128
ValidTargets: Air
Versus:
Light: 50
Pistol:
Inherits: ^LightMG
ReloadDelay: 7
Range: 3c0
Report: gun18.aud
Warhead@1Dam: SpreadDamage
Damage: 100
Versus:
None: 100
^LightMG:
Inherits: ^HeavyMG
ReloadDelay: 20
Range: 4c0
InvalidTargets: Wall
Report: mgun2.aud
Warhead@1Dam: SpreadDamage
Spread: 128
Damage: 1000
InvalidTargets: Wall
Versus:
None: 150
Wood: 30
Light: 40
Heavy: 10
Warhead@2Eff: CreateEffect
Explosions: piff
M16:
Inherits: ^LightMG
MachineGun:
Inherits: ^LightMG
Burst: 5
Report: mgun11.aud
Warhead@1Dam: SpreadDamage
Versus:
Wood: 10
Light: 70
Warhead@2Eff: CreateEffect
Explosions: piffs
MachineGunH:
Inherits: MachineGun
Warhead@1Dam: SpreadDamage
Versus:
Light: 80
APCGun:
ReloadDelay: 18
Range: 5c0
Report: gun20.aud
Projectile: Bullet
Speed: 1c682
Warhead@1Dam: SpreadDamage
Spread: 128
Damage: 2000
Versus:
None: 30
Wood: 25
Light: 75
Heavy: 25
DamageTypes: Prone50Percent, TriggerProne, DefaultDeath
Warhead@2Eff: CreateEffect
Explosions: small_poof
ValidTargets: Ground, Water, Air
APCGun.AA:
Inherits: APCGun
Range: 7c0
ValidTargets: Air
Projectile: Bullet
Speed: 2c0
Blockable: false
Warhead@1Dam: SpreadDamage
ValidTargets: Air
Versus:
None: 60
Wood: 60
Light: 125
Heavy: 60
Warhead@2Eff: CreateEffect
Explosions: small_frag