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

fix(server/state): properly reassign entities that are set to EntityOrphanMode::KeepEntity #2893

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

AvarianKnight
Copy link
Contributor

  • this swaps MoveEntityToCanidate to use ShouldServerKeepEntity instead of having specific logic for orphan mode
  • makes 'entitiesToDestroy' use ShouldServerKeepEntity instead of IsOwnedByServerScriptso we reassign if orphan mode is set to keep the entity

Goal of this PR

Properly reassign the entity to the server in certain situations where it would previously not happen

How is this PR achieving the goal

Add a new function that uses the original script check & entity orphan checks

This PR applies to the following area(s)

Server

Successfully tested on

Platforms: Windows

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

…OrphanMode::KeepEntity`

- this swaps `MoveEntityToCanidate` to use `ShouldServerKeepEntity` instead of having specific logic for orphan mode
- makes 'entitiesToDestroy' use `ShouldServerKeepEntity` instead of `IsOwnedByServerScript`so we reassign if orphan mode is set to keep the entity
@github-actions github-actions bot added the invalid Requires changes before it's considered valid and can be (re)triaged label Oct 30, 2024
Copy link
Contributor

@FabianTerhorst FabianTerhorst left a comment

Choose a reason for hiding this comment

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

👍

@FabianTerhorst FabianTerhorst added ready-to-merge This PR is enqueued for merging and removed invalid Requires changes before it's considered valid and can be (re)triaged labels Oct 31, 2024
@prikolium-cfx prikolium-cfx merged commit 138b1a5 into citizenfx:master Oct 31, 2024
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR is enqueued for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants