FRadialDamageEvent has unclear requirements

I was attempting to do some radial damage and found that the following crashes the engine,

FRadialDamageEvent DamageEvent;
actor->TakeDamage(100, DamageEvent, NULL, NULL);

After a bit of testing I found the minimum I can do is,

FRadialDamageEvent DamageEvent;
DamageEvent.DamageTypeClass = UShooterDamageTypeBase::StaticClass();
actor->TakeDamage(100, DamageEvent, NULL, NULL);

If every type of FDamageEvent in the engine needs a UDamageType class reference to not crash when used, I would expect the exposed constructor to reflect that expectation similar to how FPointDamageEvent does.

Hi Nick,

Yeah, it shouldn’t crash in any case. If a DamageType isn’t provided, it should just assume UDamageType::StaticClass(). I’ll try and fix that up real quick.

Thanks!

  • Jeff

FYI I’ve checked in a fix. A missing DamageType reference should be ok and not crash the game (UDamageType will be assumed).

-Jeff

Awesome, thanks Jeff!