diff --git a/Code/Game/Weapon/BaseCarryable/BaseCarryable.cs b/Code/Game/Weapon/BaseCarryable/BaseCarryable.cs index 6af76bc9..f80389fa 100644 --- a/Code/Game/Weapon/BaseCarryable/BaseCarryable.cs +++ b/Code/Game/Weapon/BaseCarryable/BaseCarryable.cs @@ -319,6 +319,13 @@ public void TraceAttack( TraceAttackInfo attack ) if ( !attack.Target.IsValid() ) return; + // Impact before the damage, so the prop gets the impulse and can pass it down to gibs. + if ( attack.Target.GetComponentInChildren() is var rb && rb.IsValid() ) + { + // TODO: Scale this based on damage? + rb.ApplyImpulseAt( attack.Position, Vector3.Direction( attack.Origin, attack.Position ) * rb.Mass * 100 ); + } + // Use owner as attacker when held by a player, seated player when controlled from a // contraption seat, or fall back to the weapon itself (standalone/world weapon) var attacker = EffectiveAttacker; @@ -335,12 +342,6 @@ public void TraceAttack( TraceAttackInfo attack ) dmg.OnDamage( info ); } - - if ( attack.Target.GetComponentInChildren() is var rb && rb.IsValid() ) - { - // TODO: Scale this based on damage? - rb.ApplyImpulseAt( attack.Position, Vector3.Direction( attack.Origin, attack.Position ) * rb.Mass * 100 ); - } } ///