Some users reported issues with the game no longer launching if operated on a system with ASLR disabled. This patch takes these scenarios into account. We should not look for ASLR address space if ASLR is disabled as this will fail.
The Rui library contains assertions but if they fail they never get logged anywhere. Implemented handler that will log it to the console if cvar `rui_codeAsserts` is set (enabled by default because these are very rare/never happen and we should catch and fix them at all times).
This fixes every overlay (including the VGui sprite animations for the SRAM rocket launcher). This is the correct way of fixing the function as it was clearly not updated to match the new changes unlike Hud_SetScaleX() and Hud_SetScaleY().
If sv_cheats is 1 and we run "weapon_reparse" on the client, the client will forward this command to the server as well so the server could reload its weapon scripts and be in-sync. However this command did not have the proper flags for this to function. Dedicated builds now have the right flags for this command, it now functions as intended.
We should return with the result -1 instead of executing the rest of the code because a slot idx of -1 is invalid and our structure pointer will be NULL. Very rare crash but it has happened a few times since the initial release of this project!
Engine bug that was caused after a refactor of the HUD system. The scalars were set to a child object instead of the root structure which is what Hud_SetScale() expects. Reworked the assembly code and the overlays now draw properly on the smart pistol and rocket launcher.
g_pEngineClient is an interface only class (does not contain any members), however it was pointing directly to the vftable instead of to a pointer to a vftable, therefore, using its vftable would cause a crash or otherwise undefined behavior. Changed initialization to point to the pointer to the vftable instead to yield correct behavior.
All 3 elements are of type i32, set dword instead of qword wide; reduces stack frame with 2 bytes and ensures we do not write past our array. Also fixed a type in a comment.
When using the gpu driven texture streaming system, alphasort world textures wouldn't stream because the compute shader was never executed during the alphasort render pass. The system has been modified to accomodate for the 3rd render pass, and the compute shaders now gets executed when alphasort gets rendered. Translucent materials now appear correct and stream in properly on all levels.
A code path was missed during the static texture array increase; r15 was set to module base but should've been set to the address of our new static texture array. The crash occurs when setting the cvar `stream_mode` to "all". After this change, all stream modes work as intended. This is so far the only issue that has encountered after increasing the array in commit 4de8a7d8ae.
The JSON root is now an array of objects, instead of an object with enumerated objects who's total size was controlled by another field name. This significantly simplifies the file format and parsing code. Also added a object type check for each ban entry to make sure we don't process faulty entries; these get reported to the console as a warning.
The net key is configured before the first Cbuf_Execute() call is fired, this results in the key getting configured twice when using `+net_useRandomKey <val>` over the command line. Make a dedicated command line argument (`-norandomkey`) to fix this problem.
The game is supposed to load the Mandarin streaming source file when schinese or tchinese is selected, however this didn't happen as the game's language is handled slightly different. Load mandaring streaming source files when either of the 2 languages are selected as these files contain the required audio for both. Fixes the issue where Mandarin audio couldn't be used when using schinese or tchinese language.