Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(es_extended/client/modules/death): replace gameEventTriggered #1514

Merged
merged 5 commits into from
Dec 3, 2024

Conversation

Kenshiin13
Copy link
Contributor

Description

This refactor replaces the use of gameEventTriggered with a more efficient, thread-based solution for handling player deaths. The previous approach relied on the CEventNetworkEntityDamage event, which was triggered too often, specifically for non-lethal events like vehicle crashes, causing unnecessary performance overhead. The new solution checks for player death deterministically in a thread, only triggering the death event when a player is confirmed dead.

Additionally, the typo in the Natual function name was corrected to Natural for consistency.


Motivation

This change was motivated by concerns raised by @Gellipapa about the inefficiency of using CEventNetworkEntityDamage for detecting player deaths.

@Kenshiin13 Kenshiin13 merged commit 50d736f into esx-framework:dev Dec 3, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for Next Update
Development

Successfully merging this pull request may close these issues.

3 participants