* 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.
* Run autoexec(_dev).cfg before anything else.
* Always initialize RCON (only gets ran if an actual password is set).
* Removed 'Cbuf_Execute()' call from 'CHostState::LoadConfig', let it run in the frame loop instead.
* Removed hardcoded set call for 'net_usesocketsforloopback', will be set in autoexec from now on.
Initial implementation of the bulk ban check system. This implementation takes a snapshot of the currently connected clients, sends it up to the master server, and the master server returns anything within this list that is marked 'banned'. The server would then kick the player from the server. This commit also removes the global banned list cache, as the bulk checking system offers a lot more freedom regarding banning specific players and have it sync across all available servers.
Disabled in the gamesdk at all times as users have reported issues that causes the game to freeze when switching from a remote server to a listen server. The engine bug still needs to be addressed.
* Put initializer values inside brackets.
* Put logical AND conditions within parentheses.
* Put assignments within conditional statements within parentheses.
* Mark unused variables as such to suppress compiler warnings.
* Fix vftable shadow warnings caused by ConVar::CreateInternal (does not implement, only interface. Renamed to yield desired behavior).
* Fix 'never' initialized class members for 'CCVarIteratorInternal'.
* Return values in interface vftables that cannot be pure virtual.
Force inlining this was a temporary solution in the past to overcome a crash caused by stack corruption. This problem seems to be solved, and thus its no longer necessary to force inline all methods.
Mapped out all members, also fixed the initialization of members. Some fields were never getting initialized, and m_iCurrentState was initialized improperly.
Use 'GetNumClients' instead of iterating over the client array twice. Also fixed a bug causing the status bar only to display real clients, buts were never counted.
Unfortunately clang-cl doesn't support __FUNCTION__ macro concat. Some SSE stuff in mathlib/navmesh rendering also needs to be made portable at some point.
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.
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.
This should allow users to host dedicated servers without looking back, as you should reload/restart a server every 3 hours (a full process restart is the most recommended option, but a 'soft' reload works like a charm most of the time).
We reset the idle name in HS_GAME_SHUTDOWN, but the restart command callback uses the name field to 'map' into the same map (restarting), which causes issues when we reset it to 'server_idle'.
Changed behavior to only reset name (non recursive) if we are running but do not have an active game.
* Replaced the boolean 'fatal' parameter with a error code parameter, anything non-null will prompt a message (fatal) and terminate the process with given error code.
* Fixed bug where the global ostreamsink for spdlog did NOT get cleared in 'SQVM_PrintFunc' when cvar 'sq_showvmoutput' was < 3. Moved to global scope.
* Added error message for when detouring the process has failed, with the error code.
* Only call 'Plat_GetProcessUpTime()' once per log, (improves performance and fixes bug where the error message box would show a different time stamp than what is logged into the console or file).
* All TIER0 loggers only log to notify and console when the SDK engine has fully initialized and detoured all functions.
Bool is a char on this platform, and UINT8_MAX is 0xff (255), yet we set this char to 256 causing arithmetic overflow. Looking at the assembly of the game, this really is a uint16_t, and gets set to 256 in CHostState::Init, parsed to State_NewGame as 256 before the lowbyte is being reset to 0.
* Fixed bug where multiple of the same entries get added to the global ban/refuse list.
* Fixed bug where we still use the client instance after deleting it in 'CBanSystem::BanListCheck()'.
* Load banlist at a later state (not at construction of class), this is needed for a future change of adapting the 'business' code to feature the game's FileSystem.
* CServer cleanup.
* More detailed ban messages (banned, added to refused list, removed from slot, etc..).
* Use localization key for banned message ("#Valve_Reject_Banned").
* Add const qualifiers to all CPylon methods.
Note:
* This commit requires changes on the master server, these changes are already performed, however the new master server isn't live yet until we publish the new release.
* Run 'CHostState::Think()' in the main thread.
* Construct 'NetGameServer_t' objects in main thread before dispatching (TODO: browser).
* Dispatch the call to 'CBanSystem::AddConnectionRefuse' from 'SV_IsClientBanned' to the main thread if we aren't main.
* Return bool for CBanSystem::AddEntry and CBanSystem::DeleteEntry for future optimizations (next commit).
When fatal is set, the function will show a error dialogue, which will halt the process and close when the message is dismissed. Else we will end up in a crash.
Also reversed one new method: IEngine::GetPlaylistCount (gets the number of playlists read from the playlists file, the other 2 unknown methods after this one also do stuff with the playlists, but rather on KeyValues level, one checks if something exists i think, the other returns a const char. Haven't ran these yet).