-
Notifications
You must be signed in to change notification settings - Fork 188
Enhance persistence plugin #464
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
base: master
Are you sure you want to change the base?
Conversation
Any reason why this plugin exists? Except logs. I suggest deleting it, or at least updating it to match the naive behavior and save more stuff - eg dt. 1. rm bicycle code, just use duplicator lib (its saves dt & other helpful things) - make it better & native bahiavor 2. use native methods Get/SetPersistent - for better compatibility with addons 3. disable sbox persist hooks if plugin enabled - we make custom behaivor, default persist system should be disabled
rm unused code
|
The primary reason is the monumental lag that occurs from the regular saving of the entities as well as many other inefficiencies of the vanilla persistence. Using the duplicator library is the primary cause of the issue which is why we have our own implementation. Originally we were using the sandbox persistence but unfortunately discovered the major pitfalls of it in our live testing, it will become very laggy over time as more and more entities are required to be saved. |
|
Then maybe lets use just a few non laggy things like |
|
Ideally yes but you would need to test with a server that has lots of entities saved over a decent period of time to ensure those also aren't causes to the issue. |
|
Okey maybe lets just add more stuff like dt to original implementation? |
|
Yeah that's probably a more reliable route. |
|
Sounds good.
|
|
I think we avoided using the default persistence Get/Set due to other addons actually having issues because the implementations of persistence was different. Unsure about the other. |
add more properties save to default implementation
add Entity:OnHelixPersistLoad/OnHelixPersistSave
add data arg to OnHelixPersistLoad make custom data loading possible
|
PTAL |
Lucasgood5
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An "Enhance persistance plugin" Pull request should not edit plugins/stamina/sh_plugin.lua file.
| local runSpeed | ||
|
|
||
| if (SERVER) then | ||
| runSpeed = ix.config.Get("runSpeed") + character:GetAttribute("stm", 0) | ||
|
|
||
| if (client:WaterLevel() > 1) then | ||
| runSpeed = runSpeed * 0.775 | ||
| end | ||
| end | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be removed.
Any reason why this plugin exists? Except logs & custom path.
I suggest deleting it, or at least updating it to match the native behavior and save more stuff - eg dt.