tweak(net): generate truly random "GUID"'s
Goal of this PR
This is old code that only gets used on initial client connection in cases where the peer doesn't match the same TCP peer (for situations like Cloudflare Warp or other VPN's that don't keep TCP/UDP the same)
This ID previously allowed for someone to get disconnected if they had the unfortunate coincidence of having the same tick time as another player on initial join, and while this happened rarely, it still happened.
This makes the GUID a "more random" number, and in situations where the GUID will collide it will drop the connecting client instead of the existing client. Since the GUID gets incremented on every join, there will be no valid collisions anyways.
This PR applies to the following area(s)
FiveM, RedM, Server
Successfully tested on
Game builds: ..
Platforms: Windows, Linux
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.
Simple, but effective. Approved.
Needs additional review to ensure it doesn't break some of our internal/closed-source logic.