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

98 lines
1.5 KiB
YAML

^MG:
ReloadDelay: 30
Range: 2c512
Report: MGUN2.WAV
Projectile: InstantHit
Warhead@1Dam: SpreadDamage
Spread: 128
Falloff: 100, 50, 25, 0
Damage: 1250
Versus:
wall: 10
building: 25
wood: 75
light: 40
heavy: 20
invulnerable: 0
cy: 20
harvester: 25
DamageTypes: Prone50Percent, TriggerProne, BulletDeath
Warhead@2Eff: CreateEffect
Explosions: piffs
ImpactActors: false
LMG:
Inherits: ^MG
Fremen_S:
Inherits: ^MG
ReloadDelay: 40
Report: FREMODD1.WAV
Warhead@2Eff: CreateEffect
Explosions: small_explosion
M_LMG:
Inherits: ^MG
ReloadDelay: 40
M_LMG_H:
Inherits: M_LMG
ReloadDelay: 50
M_HMG:
Inherits: ^MG
ReloadDelay: 40
Range: 3c512
Report: 20MMGUN1.WAV
Warhead@1Dam: SpreadDamage
Spread: 192
Damage: 2500
Versus:
none: 25
wall: 100
building: 50
wood: 65
light: 100
heavy: 50
invulnerable: 0
cy: 20
harvester: 50
M_HMG_H:
Inherits: M_HMG
ReloadDelay: 50
Fremen_L:
Inherits: M_HMG
Report: BAZOOK2.WAV
Warhead@1Dam: SpreadDamage
DamageTypes: Prone50Percent, TriggerProne, SmallExplosionDeath
Warhead@2Eff: CreateEffect
Explosions: small_explosion
HMG:
Inherits: ^MG
ReloadDelay: 20
Range: 3c0
Report: 20MMGUN1.WAV
Warhead@1Dam: SpreadDamage
Spread: 160
Falloff: 100, 60, 30, 0
Damage: 1800
HMGo:
Inherits: HMG
ReloadDelay: 18
HMG_muzzle:
ReloadDelay: 16
Range: 3c0
Burst: 3
BurstDelays: 2
Projectile: InstantHit
Warhead@TargetValidation: SpreadDamage
HMGo_muzzle:
Inherits: HMG_muzzle
ReloadDelay: 14