Use the 'add_module' macro to add modules without creating duplicate code. This macro also takes a reuse PCH as parameter, so modules that need a precompiled header, could reuse those from different targets that compile them. This commit also restructures the group order of the generated solution files for easier code navigation.
* All libraries have been isolated from each other, and build into separate artifacts.
* Project has been restructured to support isolating libraries.
* CCrashHandler now calls a callback on crash (setup from core/dllmain.cpp, this can be setup in any way for any project. This callback is getting called when the apllication crashes. Useful for flushing buffers before closing handles to logging files for example).
* Tier0 'CoreMsgV' function now calls a callback sink, which could be set by the user (currently setup to the SDK's internal logger in core/dllmain.cpp).
TODO:
* Add a batch file to autogenerate all projects.
* Add support for dedicated server.
* Add support for client dll.
Bugs:
* Game crashes on the title screen after the UI script compiler has finished (root cause unknown).
* Curl error messages are getting logged twice for the dedicated server due to the removal of all "DEDICATED" preprocessor directives to support isolating projects. This has to be fixed properly!
Properly decouple squirrel and game code. This makes it easier to reverse engineer more of this squirrel system, and to compile them as individual libraries later on when moving to CMake to significantly decrease compile times.
* Decoding and encoding is done into a single buffer, from raw buffers to avoid extraneous copies.
* Added base class holding all core logic for encoding, decoding, receiving and processing of the RCON protocol. This code was initially identical between all implementations of RCON, deduplicating this avoids bugs.
* Added more sophisticated error handling, stop right away when decoding for example fails.
* Added ability to have more than one active authenticated net console on the server. Controlled by cvar 'sv_rcon_maxconnections' (default 1).
* Max packet size for accepted, but not authenticated sockets is now controled by cvar 'sv_rcon_maxpacketsize' (default 1024).
Fixed bug causing script warnings/errors to not override the log level. Warnings/errors should always be printed to the console. This commit also fixes a bug that causes warnings/errors to not show in red/yellow colors in the imgui console when '-ansicolor' command line parameter isn't used. The imgui console always logs colors and does not rely on '-ansicolor', this is only for the external terminal window.
Fixed bugs that was caused by symbols that were defined, but never used.
* 'UnsignedIntConvertToFltSIMD' never used its input parameter.
* The results from the call to 'sq_call' were never checked, so if a failure took place, it was never logged.
* 'CheckForWarnings' never used the 'context' parameter, but this was required as context types of 'eDLL_T::SYSTEM_WARNING' or 'context == eDLL_T::SYSTEM_ERROR', should be returning the warning/error color as well.
* Renamed 'GetHiddenServerConnectStatus' to 'GetHiddenServerName' and added more dedicated error handling within its logic, as the results from the call 'g_pMasterServer->GetServerByToken' was never checked.
Add global define for the clang compiler, and leave non-member 'fltx4' operator functions out when using clang to compile the SDK as these are causing errors. 'fltx4' is a typedef of __m128; not a user defined class, so these operators couldn't be added.
RCON upgrade with additional logging system improvements:
* Netconsole's can now log received messages in color, even when the RCON server has ANSI colors disabled; logs are fully composed locally.
* RCON server now also sends the log type over the wire, along with the (already existing) context.
* SDK logging code is now shared with the standalone netconsole application.
* Improved logging readability for the standalone netconsole application.
Changed all loggers to use the internal 'CoreMsg/CoreMsgV' functions. Significantly reduced duplicate code and CPU time. Code is also much more robust.
* Code now only acquires mutex lock when the actual logging part takes place.
* Code now only checks and strip ANSI rows if its enabled to begin with.
* Code now supports setting log levels, which ultimately could be tweaked with a cvar.
* Changed logger and file names to be more readable.
TODO:
* The RCON protocol has to be modified to accommodate these changes.
Start of refactoring entire logging system. This refactor should remove all duplicate code across all loggers. The logic behind DevMsg, Warning and Error has now been successfully refactored into a single helper function.
Light cleanup and optimizations for Squirrel script functions. Use existing pointers or references as much as possible in place of extraneous string copies.