Skip to content

Impulse needs to be applied before damage, for gibs#274

Open
Xenthio wants to merge 1 commit into
Facepunch:mainfrom
Xenthio:pr/apply-velocity-before-damaging
Open

Impulse needs to be applied before damage, for gibs#274
Xenthio wants to merge 1 commit into
Facepunch:mainfrom
Xenthio:pr/apply-velocity-before-damaging

Conversation

@Xenthio

@Xenthio Xenthio commented May 29, 2026

Copy link
Copy Markdown

This is part 1 of 2 in fixing prop gibs having no velocity.
This bugfix can be applied regardless of if my engine changes go through or not, as its the case for how forceful damage is done elsewhere and stuff (radiusdamage in engine)

Copilot AI review requested due to automatic review settings May 29, 2026 22:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR changes BaseCarryable.TraceAttack so physics impulse is applied to impacted rigidbodies before damage is processed, enabling impulses to propagate (e.g., into gib chains) prior to damage side-effects.

Changes:

  • Apply rigidbody impact impulse before the damage logic runs in TraceAttack.
  • Remove the previous post-damage impulse application block.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Code/Game/Weapon/BaseCarryable/BaseCarryable.cs
Comment thread Code/Game/Weapon/BaseCarryable/BaseCarryable.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants