* Promoted size types in CUtlBuffer to int64.
* Fixed bug where CUtlBuffer::GetPtr returns a 64bit pointer that was promoted from a 32bit integral type.
* Use int64/size_t for anything strlen, pointer subtraction, etc..
* Removed invalid structure alignment declarations.
The behavior has been changed; when a material is missing and bComplain is false, nothing gets printed to the console unless 'mat_alwaysComplain' is nonzero.
* Move all default assignments to constructor.
* Rename cvar 'con_max_size_logvector' to 'con_max_lines'.
* Rename cvar 'con_max_size_history' to 'con_max_history'.
* Use array indexes instead of hardcoding context prefixes.
* Added netcon context prefix to help legend.
* Added public method to obtain history as string vector.
* Added public method to clear history.
* Internal CConsole::AddLog no longer locks the mutex.
* CConsole::LoadFlagIcons accesses resource vector by reference.
* Implemented "HELP", "HISTORY" and "CLEAR" as real console commands: "con_help", "con_history", "con_clearlines".
* Added a new command "con_clearhistory" (clears the dev console submission history).
The ConVar 'bhit_abs_origin' will now draw a sphere at the predicted abs origin of the entity upon hit. This is useful for debugging lag compensation on the server (white star).
If the client happens to exceed the quota by accident, the client will not be disconnected. This is a quality of life change. Client could still increase cl_quota_stringCmdsPerSecond to allow more submissions per second, or disabling the throttle entirely by setting cl_quota_stringCmdsPerSecond to 0.
In this retail engine, "DEV" is always zero, except for scripts.rson. I think Respawn Entertainment defined this as zero for production builds under each context except the global one.. To fix this problem, we define a new constant named "DEVELOPER", change all references in scripts that where DEV (now R5DEV due to legacy reasons to mitigate this problem), to DEVELOPER. When the game is launched with -dev, anything within #if DEVELOPER with compiled, like the development behavior of DEV.
Client's can run string commands on the server with no rate limit. This means when you run 50k+ commands that are unknown, or spam 30k 'status' commands, you will be able to hang the server for 800/1200ms (15k/30kms if script printing to console is enabled!). Although the netchan processing budget system will kick you, the damage has already been done at this point. This change effectively breaks the ability to DOS the server from the client using networked string commands.
In easier words; binding 'status' to your mousewheel will get you kicked from the server, without hitching the server.
* Check if m_MessageHandler is removed before running limit test.
* Add warning DevMsg if client exceeds value.
* Default 'net_processTimeBudget' value to '200'.
Implement net message process budget (channel gets removed if value is exceeded).
Use 'net_processLimit' to enable the implementation on the server. It will get enabled by default after testing and some cleanup. This helps against people trying to slow the server down by spamming net messages with a higher rate, e.g. using 'bind "mousewheel_up" "status"'.
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).
* Fade notify text by a fixed amount regardless of the frame times.
* Implement Valve's 'lerping' animation for text when entries fade away and expire.
* Don't run/push/remove anything if 'con_drawnotify' is disabled.
* 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.
* 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..
* Eliminated all forms of concurrency for CConsole logger.
* Used enum for determining which theme user loaded (DEFAULT, LEGACY, MODERN).
* Fixed issue where browser panel doesn't have the same frame padding as the console for the modern theme.
* Fixed issue where the history items count shows number higher than maximum until updated (updates vector before displaying, else this happens in g_pConsole->RunTask which is the operation that happens before we add new elements to the vector, thus showing the wrong count as this size is getting corrected the next frame after we painted, we don't update the summary each frame for performance reasons).
* 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.
* Improve readability.
* Free allocated iterator memory.
* Enforce FCVAR_HIDDEN ConVar's in ImGui console (there are only 17 ConVar's marked 'hidden', and most of these are stryder/platform related stuff. This is usefull for if we ever wish to create a hidden cvar).
Addressed:
* 'Expression: vector subscript out of range' (we only ever ensured capacity upon construction).
* Compiler error as AssertMsg1 is unimplemented, used Assert instead.
This commit breaks the indev branch for the time being (this will be solved very soon).
We no longer mask off dev flags from every commandbase, we only mask them off from the essential ones (map, connect, give, etc..), unless the SDK is launched as dev, then we mask everything off like usual, but this time at initialization and not whenever we encounter a var with this flag.
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.
* Move AIN/NavMesh debug draw to ai_utility_shared.cpp.
* Use shift index + range for AIN debug draw.
* Added cvar for determining max distance between camera and tile (anything outside this range doesn't get draw).