* 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.
* 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.
Using the 'new' keyword and then assigning *this to *pNewConVar will lead to having 2 copies of the same constructed data, and one being used in the SDK whilst the other one being used by the engine.
We unfortunately cannot write the code exactly like the engine, as we hook the engine and dependent heavily on its global memalloc singleton.
This commit fixes the memory leak and allows the engine to free the memory as well whenever it wants to.
COMMAND_COMPLETION_MAXITEMS and COMMAND_COMPLETION_ITEM_LENGTH are confirmed to be 128 (original code is 64).
New register func sets the callback bit fields accordingly (no longer hardcoded).
* 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.
Implemented StringSplit() (split string with a delimiter, and stop splitting after either the last delimiter has been reached, or nMax, so when nMax is 2, then 'SET mat_sky_color 255 255 0 255' gets split into: "SET" "mat_sky_color" "255 255 0 255").
Netconsole now sends ConVar's/ConCommands and values separately with use of StringSplit.
ConVar now uses internal ChangeStringValue (this runs the callback).
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).
* 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).
* Pointer to g_pMemAllocSingleton
* New wrapper for returning the singleton, and creating one if not yet initialized (game shares the same pointer, and is aware of its creation).
navmesh_draw_portal > -1 enables the overlay, with this cvar you can also shift through tiles.
navmesh_debug_type [0 - 4] selects the NavMesh (small, med_short, medium, large, extra_large).