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

feat(server/state): add [GET/SET]_ENTITY_ORPHAN_MODE #2741

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AvarianKnight
Copy link
Contributor

Goal of this PR

Allow server owners to choose how they want the entity to be treated when it no longer has a valid/relevant owner.

This will allow for servers to use client side CREATE_* natives while being able keep the entity relatively persistent like the server setters, and also avoiding some of the known bugs with server-setters.

This will also allow the server owner to have specific entities be deleted whenever they leave the server.

How is this PR achieving the goal

Add EntityOrphanModes to let the server owner choose how they want an entity to be treated when the entity loses its first owner or is no longer relevant.

This PR applies to the following area(s)

Server

Successfully tested on

Game builds: N/A

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.

@github-actions github-actions bot added the invalid Requires changes before it's considered valid and can be (re)triaged label Aug 22, 2024
@prikolium-cfx prikolium-cfx added triage Needs a preliminary assessment to determine the urgency and required action and removed invalid Requires changes before it's considered valid and can be (re)triaged labels Sep 19, 2024
- this allows the end user to be able to define how they want an entity to be deleted instead of automatically cleaning up every entity on entity GC
- this is mainly useful for allowing the server to keep specific client entities (like vehicles) from being automatically deleted
- this allows for the same persistence as server created entities but without the draw backs.
- also allows for specific entities (like objects) to be marked for deletion whenever the client leaves the server
@github-actions github-actions bot added invalid Requires changes before it's considered valid and can be (re)triaged and removed triage Needs a preliminary assessment to determine the urgency and required action labels Sep 25, 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.

Thanks a lot for your contribution. Works very well.

@FabianTerhorst FabianTerhorst added enhancement Feature or other request that adds functionality or improved usability 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 Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature or other request that adds functionality or improved usability ready-to-merge This PR is enqueued for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants