* Use game's CNetAdr RCON and socket creator.
* Add support for constructing host from [ip]:port format in the netconsole client.
* Pass 'netadr_t' parameter by reference to 'CSocketCreator::OnSocketAccepted'.
Huge cleanup for dedicated. All patches in 'opcodes.cpp' are now directly applied to the executable, and kept as reference in the source file. The patch logic is commented. Any other patches for the dedicated server executable should be documented in the patch file found in 'r5dev/resource/patch'.
This change was planned for a long time. This moves all REGISTER calls to a single translation unit, this is required as we currently added a very dirty workaround for not registering duplicates by checking if VFTable pointer was already present in the vector... Registering from single translation unit prevents duplicate instances that gets created if header is included by more cpp files.
Reworking this reduced 100kb+ of compiled code. This commit also reworked the way functions/variables/constant gets logged with their addresses; the new code formats them on the fly, and allows for resize at any time. Formatting is no longer required by programmer.
TODO: currently there are some compile errors for dedicated and client dll's. These will be resolved very soon as they need to be properly worked out still (server & client only stuff needs to be properly split). Use the 'main' (stable) branch for the time being if you need to compile these dll's.
* Changed 'CClient' handle time to 'edict_t' which is an alias of 'uint16_t'.
* Changed 'g_pServerGameDLL' and 'g_pServerGameClients' init (obtain from factory instead).
* Use interface version macro's for obtaining factory pointers instead.
* Added 'g_pServerGameEntities'.
The documentation file for all patches applied to 'r5apex.exe' could be found in 'r5dev/resource/patch/r5apex.patch'. This is a text file containing the offset to the patch and its original instructions followed by the new instructions.
Disabled as this code is only ran if the VideoConfig file is getting written. To fix this bug, the executable has to be patched. This will be documented and shipped in the next release.
In Respawn's engine, the '-forceborder' command line parameter does the same thing as '-noborder'. '-forceborder' should remove the flags (nand) while '-noborder' should append the borderless flag. This code is an attempt to mitigate the problem. There was not enough bytes to assemble the nand operation for this code path without involving code caves or shifting.
Server classes are only included on dedicated and host, client didn't use them. These files included the keyvalues header. Added header file to fix the compile errors.
Used proper enum for context. The low level tier1 stuff should print in COMMON.
Also added newlines where missing, the logging system will undergo a change where a newline will only be appended if we are logging in the same context without a newline.
We used the hoststate levelname string, but this only applies to the host. Keep the levelname that was passed to 'Mod_LoadPakForMap()', and set the init bool after we ran 'Mod_GetLevelSettings()'.
When you connect to a server, the server sends its playlists down to the client. When we disconnect from the server, we reload the playlists so that our panels, and the game itself, presents the playlists that are on the clients disk. The reload never really happened as we checked if the call was not from the main thread, but since the large refactor several months ago, the call will always be issued from the main thread. I removed the dispatching code and made it only run on the client.
Fix bug where 'Mod_LevelHasChanged(...)' returns false even though it had changed. The static var was set in a different function which worked with the old system. The static var is now set within 'Mod_GetLevelSettings()', if 'Mod_LevelHasChanged()' returns true.
Previously we used Json, however the rest of the game features KeyValues. I changed the system to feature KeyValues instead, to maintain consistency. Also improved the logic behind loading/parsing so we don't reparse the same level settings file if the pointer is still valid and we are on the same level.
Relies on the engine's implementation of 'KeyValues::RecursiveSaveToFile'. The IFileSystem methods have been fixed up with the CUtlBuffer class rebuild in which we could call these to write a KV memory structure as a file to the disk.
* Used 'htonl'/'ntohl' for constructing the length prefix.
* Used static socket/address members instead of pointers.
* Used const qualifier where possible.
* Changed length prefix field type to 'u_long'.
* Removed extraneous include.
* Properly escaped percentage characters on the RCON game client for the ImGui console.
The Season 3 versions of the executable deadlock when threaded bone setup has been enabled on the client while the listen server has ran at least once during the process lifetime.
The default engine implementation of DrawAllOverlays will return early when cvar 'enable_debug_overlays' is false. The problem with this is that overlays are still added, which fills memory unnecessarily and also increases CPU time as they never decay, which overloads the function 'PurgeServerOverlays'. This became evident after profiling the application. Numerous people reported the bug.
server loads "vpk/server_mp_lobby.bsp" instead of "vpk/client_mp_common.bsp" and "vpk/client_frontend.bsp". Also removed the old hack we used to patch string constants to format VPK string paths as we have a proper implementation now using CEngineAPI::SetStartupInfo.
When '-novpk' is passed, the engine won't use the filesystem cache, and won't mount any VPK's (all files could be loaded from the disk essentially, the VPK files will be ignored).