Skip to content

Comments

feat(listeners): add entity & player damage listeners#1147

Merged
roflmuffin merged 2 commits intomainfrom
feature/damage-events
Dec 15, 2025
Merged

feat(listeners): add entity & player damage listeners#1147
roflmuffin merged 2 commits intomainfrom
feature/damage-events

Conversation

@roflmuffin
Copy link
Owner

@roflmuffin roflmuffin commented Dec 15, 2025

Brings the detour for TakeDamageOld into core and propagates the flow through some core listeners:

  • OnEntityTakeDamagePre: cancellable to prevent the damage from applying and preventing future events
  • OnEntityTakeDamagePost: non-cancellable, used for reacting to damage and has access to CTakeDamageResult
  • OnPlayerTakeDamagePre: same as the entity pre hook, but a convenience method that is player specific; it only runs for player pawns
  • OnPlayerTakeDamagePost: same as above, player specific

@roflmuffin roflmuffin merged commit 395b237 into main Dec 15, 2025
8 checks passed
@roflmuffin roflmuffin deleted the feature/damage-events branch December 15, 2025 07:41
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.

1 participant