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

Use a different approach to check entity for modstorage #115

Open
wants to merge 19 commits into
base: development
Choose a base branch
from

Conversation

lava76
Copy link
Contributor

@lava76 lava76 commented Apr 4, 2022

Only needs to keep track of players. See comments in CF_ModStorageModule.c near the top.

Only needs to keep track of players. See comments in CF_ModStorageModule.c near the top.
@lava76
Copy link
Contributor Author

lava76 commented Apr 4, 2022

Important note: The wipefile version has been bumped to 129 (1.17 Experimental). If you are on 1.17 Exp and have existing storage, just add an empty modstorageplayers.bin to your storage_<x>/communityframework folder before starting the server with modstorage for the 1st time and it'll work fine.

@lava76
Copy link
Contributor Author

lava76 commented Apr 5, 2022

Turns out identity is NULL at a point where I'm checking it, this went unnoticed because it doesn't seem to cause any readily visible problems. I'll try and come up with a fix for this later.

lava76 added 9 commits April 6, 2022 02:16
Player may get booted before the game has had a chance to assign his identity, which will cause his inventory to be persisted immediately, so we need to add him for next load
…tion

- ModStorage is now at version 5 (version 4 will be read and converted)
- Moved from saving/reading all data as string to handling each data type separately (fixes memory leak in case of read errors)
- Fixed unloaded mods array not being resized to correct size if read failed
- Optimization: Do not save mods without data
@lava76
Copy link
Contributor Author

lava76 commented Apr 22, 2022

Just as a heads-up, this version of ModStorage is used by Expansion since the 14th by duplicating some of the bits to make it work until CF catches up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant