* 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.
* Installed change callback 'NET_UseRandomKeyChanged_f' for cvar 'net_useRandomKey' (when set, it will generate a random key as this is needed when this is enabled!).
* 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).
* Only run '_DownloadPlaylists_f()' in the main thread, schedule for next frame if we aren't in the main thread. (this should fix crash cases related to disconnecting from the game).
* Locked read/write to CBrowser members (thread for obtaining the server list is detached, but once the 'slow' post operation in this thread is complete, mutex lock is acquired (locking the render thread if the browser is active) to set the string members of CBrowser, this operation is very fast as we only set the string and the color after the http post operation (this never caused a crash, but the behavior without any lock mechanism is technically undefined regardless).
* Obtain the host name dynamically from the ConVar 'pylon_matchmaking_hostname' (atomic operation). Initial approach was deleting the whole master server pointer just to construct a new httpclient object..
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.
* Fix all compiler error for GameSDK on S0 and S1.
* Remove some unused patterns and globals (launch performance gains of 100ms).
* Remove most duplicate patterns.
* Relocate globals from engine to a more appropriate location.
* Renamed some unknown vars to a more appropriate name (most of these where obtained a while back, but as we reversed more parts of the engine, some of these vars become known).
* Renamed some vars to fit the naming convention used in the SDK.
* Fixed pattern debug logging using the wrong pointer, thus displaying the wrong address.
Implement VFTable's to interface with engine (for the most part mapped out, only the new VPK methods needs further reversing).
This exposes a good majority of the FileSystem implementation of the engine, to the SDK.
* Use c++ methods as much as possible.
* Use enum types for accessing NavMesh objects from array.
* Use size_t for for loops when testing against size types.
* Don't compute strlen twice of more on the same string.
* Don't use unnecessary c string casts if there is a method with a std::string overload.
* Don't create string objects from string pointers if we could use them directly.
* Don't initialize RCON password twice on each change, and don't set if the new password equals the old.
* Moved ConVar usage text that where part of the help string to the usage string parameter.
* Flagged ConVar 'bhit_abs_origin' as FCVAR_DEVELOPMENTONLY | FCVAR_REPLICATED.
* Flagged ConCommand 'bhit' as FCVAR_DEVELOPMENTONLY | FCVAR_GAMEDLL.
* Check 'bhit_enable' before running the 'bhit' command callback.
* Fixed spelling in a few area's.
CUtlVector containing callbacks (you can have several callbacks for each ConVar).
also, in 'ConVar::InternalSetValue' Valve and Respawn run V_atod (atof) on function param 'pszValue', but they also check if input param 'pszValue' is a nullptr (which in this case, 'pszNewValue' gets set to an empty string), but yet they deref 'pszValue' (nullptr or not) in 'SetColorFromString' and V_atod, is this correct behavior?
For now I swapped these out with 'pszNewValue' for the very rare event the string happens to be nullptr.
The command is only implemented on the dedicated server or debug servers, so i cannot tell for sure what exactly 'bhit' does. But its either some form of telemetry or debug.
The command sends the player index that got hit on the prediction engine, the bullet fire origin and the angles relative to the target that got hit.
For now the command draws the bullet trajectory if it hits a player.
This commit also fixes the 'Unknown command: bhit' message.
* Changing RCON passwords on the server now closes all connections and re-initializes the system.
* Fully mapped out VFTable interface for IConVar* (used for ConVar callbacks, see callback.cpp).
* Added RPakAssetBinding_t.
* Added RPakUnknownStruct_t
* PatternScan the global RPakUnknownStruct_t.
* Renamed Members of CMaterialGlue
* RTechTextureInfo_t now has another unknown member named.
SourceSDK mathlib port with light modifications.
Renamed Vector to Vector3D (to avoid confusion with std::vector (declared as vector) and Vector2D/Vector4D).