* Check if server is active in command callback before attempting to hot swap.
* Hook 'v_Detour_LevelInit', and log NavMeshes that failed to load.
* Split free/destroy logic into separate function.
* Created constants for NavMesh and AI Network paths/extensions.
* Added performance profiler for hot swap logic in command callback.
* Renamed "navmesh_reload" to "navmesh_hotswap".
* "navmesh_hotswap" is now development only.
The new command 'navmesh_reload' hot swaps the current NavMesh for all hulls in memory, with that of the 'new' files on the disk. The memory of the old NavMesh gets freed and destroyed.
This commit implements missing material error logging.
When a material does not exist, it will get replaced with an error material, we log which material is missing, and with which error material it gets replaced with.
This commit also comes with some updates regarding the CMaterialGlue class, and some new types used by this class from the RePak project.
* Make box's mins and maxs static const.
* Use SSE to pack 4 indices into 1 128bit register, and shuffle to prevent duplication. Only 2 indices are used at the moment.
* Init vCamera once during call (MainViewOrigin() won't change during the execution of this function).
* Construct Vector3D for camera distance only once, using SIMD.
Obtain values of ConVar once a frame instead of checking within loop. There is no point changing the values while we are rendering. Thi sshould increase performance when drawing larger NavMeshes.
* Construct min/max for AI Script Network boxes using SIMD (significantly reduced instruction count!).
* Move NavMesh debug draw to dedicated class for future changes.
* Use SIMD to construct vertices into single XMM register.
* Use SIMD to construct origin and destination vectors from vertices.
* Deref 'navmesh_debug_camera_range' only once outside the render loop.
* Light code cleanup.
* Use SIMD to construct a Vector3D in a single instruction, instead of setting the vector fields individually.
* Store ConVar value as const bool outside loop.
* Slightly improved variable naming.
* 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.
'(checksum: '0x%X' expected: '0x%X')': checksum was NavMesh, and expected is the nodegraph.
'checksum' should be the nodegraph crc (what we obtain from the AINet header), and expected should be the computed NavMesh crc, since we consider the AIN 'out of date' when its checksum doesn't match the NavMesh one.
* 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.
* 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.
* 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).
* Use proper format specifier for short.
* Remove redundant IsBadReadPtrV2 call when writing script nodes (this was initially for debugging but hasn't been removed after development finished).