Skip to content

tweak(native-decls): update documentation for trains #3353

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

Merged
merged 1 commit into from
Apr 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ext/native-decls/SetEntityOrphanMode.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ enum EntityOrphanMode {
}
```

Sets what happens when the entity is orphaned and no longer has its original owner.
Sets what the server will do when the entity no longer has its original owner. By default the server will cleanup entities that it considers "no longer relevant".

**NOTE**: This native doesn't guarantee the persistence of the entity.
When used on trains, this native will recursively call onto all attached carriages.

**NOTE**: When used with `KeepEntity` (2) this native only guarantees that the ***server*** will not delete the entity, client requests to delete the entity will still work perfectly fine.
Copy link
Contributor

Choose a reason for hiding this comment

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

if entity is created serverside, won't sv_protectServerEntities convar prevent the client from deleting the entity?

If yes, this note may cause some misunderstanding.

Copy link
Contributor

@Ehbw Ehbw Apr 23, 2025

Choose a reason for hiding this comment

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

if entity is created serverside, won't sv_protectServerEntities convar prevent the client from deleting the entity?

If yes, this note may cause some misunderstanding.

At this moment trains are unable to be created on the server I misread. But yes, the client will be unable to delete it

Copy link
Contributor

Choose a reason for hiding this comment

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

GitHub is little funky with the comment creation, but I meant the line 30 exclusively.


## Parameters
* **entity**: The entity to set the orphan mode of
Expand Down
Loading