Skip to content

fix(es_extended/): fix race conditions & ped change not propogating#1558

Merged
Kenshiin13 merged 4 commits into
esx-framework:devfrom
Kenshiin13:fix-race-condition
Dec 23, 2024
Merged

fix(es_extended/): fix race conditions & ped change not propogating#1558
Kenshiin13 merged 4 commits into
esx-framework:devfrom
Kenshiin13:fix-race-condition

Conversation

@Kenshiin13

@Kenshiin13 Kenshiin13 commented Dec 23, 2024

Copy link
Copy Markdown
Contributor

Summary

  • Fixed an issue where relying on ESX.PlayerLoaded to be true in importing resources did not garuantee that the ped has fully spawned.
  • Fixed an issue with ped changes not propogating to importing resources due to execution order.
  • Fixed death module relying on a possibly invalid ped which would trigger the death logic.

PR Checklist

  • My commit messages and PR title follow the Conventional Commits standard.
  • My changes have been tested locally and function as expected.
  • My PR does not introduce any breaking changes.
  • I have provided a clear explanation of what my PR does, including the reasoning behind the changes and any relevant context.

@Kenshiin13 Kenshiin13 self-assigned this Dec 23, 2024
@Kenshiin13 Kenshiin13 marked this pull request as ready for review December 23, 2024 00:31
@Kenshiin13 Kenshiin13 changed the title fix(es_extended/imports): wait for ped to be set before setting PlayerLoaded fix(es_extended/): fix race conditions & ped change not propogating Dec 23, 2024

@N0tNvll N0tNvll left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixes to:

  • Prevent to change the loaded status to true if the ped isnt loaded.
  • Checks to detect if the ped already exist before checking the status.

All of this changes are mainly made to prevent possible issues in different situations like when the player load/reload or status of the ped

@Kenshiin13 Kenshiin13 merged commit bb98a81 into esx-framework:dev Dec 23, 2024
@Kenshiin13 Kenshiin13 deleted the fix-race-condition branch December 23, 2024 16:05
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.

2 participants