Some CMaterial instances are allocated on the heap, and we only check for bounds in .data/.pdata. Checking bounds is cheap, checking valid ptr's is not. However we are lucky most of the data is within the segments, so running this isn't too costly.
This fixes the problem where the large leaf model in worlds edge was missing.
* Use reference to array index.
* Only obtain array size once during loop.
* Use static buffer of 1024*1024 for decompressing.
* Removed extraneous goto.
* Fixed bug where shared data would be mapped wrong due to the last optimization.
* This increased packing performance by 40/60 seconds when rebuilding all vpk's.
* Hash chunk before compression to determine if it already exists or not (don't run compression if it does).
* Use the result of vector::insert for data sharing (insert already checks if it exists or not, and returns the iterator).
* This optimization saves around 20 seconds total when rebuilding all VPK's.
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).
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.
the parameter check for '-novid' has been removed from S2 onwards, but later added back in. Our S3 build doesn't have it as well. This commit adds it back in and allows user to launch the game without the startup video's by adding '-novid' to the launch arguments. ('-dev' also works, but this enables developer and sv_cheats..).
Must be passed from the launcher, as this is removed from the configuration files for prod. Ticking the development box will pass '-dev' and '-devsdk'.
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.
'Script_DestroySignalEntryListHead' is the last function to be called before 'init.nut' is loaded and parsed. Defining "DEVELOPER" with value of "developer" convar allows us to utilize this constant in 'init.nut'.
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.