feat(server): add command to reload resource client file
Goal of this PR
This PR adds a command to reload a specific resource’s client files from the file server. Using this command ensures that subsequent players (or for streamed assets, when fetched later) will load the updated files.
The key difference from ensure/restart is that it applies to players who join afterwards rather than affecting current players immediately.
How is this PR achieving the goal
Adds the reloadclientfile command to reload a specific resource’s client files from the file server.
This PR applies to the following area(s)
Server
Successfully tested on
Game builds: N/A
Platforms: Windows
Checklist
- [x] Code compiles and has been tested successfully.
- [x] Code explains itself well and/or is documented.
- [x] My commit message explains what the changes do and what they are for.
- [x] No extra compilation warnings are added by these changes.
Fixes issues
N/A
Good idea
Why would this be better than using ensure/restart? I would have thought that having some clients having different code to others may cause more issues?
I'm not a proper developer so genuinely interested on what this would help.
Why would this be better than using ensure/restart? I would have thought that having some clients having different code to others may cause more issues? I'm not a proper developer so genuinely interested on what this would help.
If there are 500 players on a server and you restart a script, it will cause a lot of network traffic. Also, if you update files such as weapon files, there is a high chance that the game will crash.
This is one of the most useful PRs I've seen so far. Thank you.
Would definitely love to see some movement on this PR - i think if implemented correctly would be a great tool for quick fixing bugs and issues if needed without having to disrupt the entire the server via restart.