RCON lacked encryption, added AES-CTR encryption on RCON frames. Slightly adjusted protocol to take this into account (sending nonces, encrypted data itself, etc).
Implemented CustomEvent in code, which supports:
- bool|int|float|string|vector|array|table
- nested arrays and tables, up to a depth of 64
Also improved foundation code for LiveAPI:
- added ability to log liveapi events to a file on the disk (rotates between each match or round, depending on how the abstracted functions are called in scripts)
- when the system is enabled through cvars, code will be invoked on the fly
- when the system is disabled through cvars, the system will be shutdown properly on the fly (properly handling socket closing, log file finishing, etc)
- if the socket system is enabled/disabled on the fly using cvars, related code will be called to initiate or shutdown the connections.
The generated proto.cpp/h file has been moved to the protoc project as it was causing some compiler warnings that we suppress on the thirdparty (vendored) code.
Full implementation of all LiveAPI events into the game server.
NOTE: The only event left to be implemented in code is CustomEvent.
NOTE: ObserverSwitched and WeaponSwitched events are implemented in code, but they need a proper CodeCallback to hook them up properly in scripts.
The events.proto file is from build "R5pc_r5-200_J33_CL6243000_2024_02_27_14_53" with some slight modifications:
- PlayerStatChanged.newValue is now a oneof field, which can be either int, float or bool as Season 3 Apex still handles stats in one of those 3 types while retail was only int (which is most likely why they kept it just int only int he proto file).
- PlayerRespawnTeam.respawned is now a repeated Player field instead of a string. Initially the respawned field contained a comma separated list of player names that were respawned in the team, it now contains the actual Player data that is respawned as this was much easier to get from scripts, and also makes a bunch more sense than just string names.
- New CustomEvent event: since R5Reloaded is a modding platform, and we can't make new events for literally all gamemodes that modders create, we added another event "CustomEvent" which allows modders to sent their own data to their own tracker or anything while still remaining compatibility with the protocol.