Limits frames at a much higher level of precision than 'fps_max' and 'fps_max_gfx', probably ideal to reduce input latency even more. Also changed the logic of the NVIDIA Reflex frame limiter, to which it would use the desktop's refresh rate if set to '-1'. The new render thread frame limiter has a similar behavior. Using desktop refresh rates on the render thread or NVIDIA Reflex frame limiter requires 'fps_max' to be set to 0 (unlimited), as it would otherwise result in a major performance drop due to a contest if fps_max_(gfx/rt) is set to a similar number as fps_max.
The server can exploit the client with these netmessages, therefore, sv_cheats shouldn't be used to toggle it. Create a cvar that the server and client have to enable individually to enable the system.
Use CUtlVector, and remove every copy caused by passing vectors by value. CUtlVector does not support copying. Also removed all extraneous std::string copies caused by calling itoa instead of std::to_string, or std::stoll, etc. All features have been tested and work as designed.
The runtime checksum is now also written to the file, as any changes to the info node entities will cause this checksum to change, and therefore we should warn the user that the file needs to be rebuilt. The NavMesh CRC is now written at the END of the AIN file, and only checked if a NavMesh is present for that particular level. The same warning gets printed if this checksum mismatches as the user should rebuilt it.
NOTE: the NavMesh checks are custom and are not part of the official AIN file structure of this game. This is added as the NavMeshes are frequently rebuilt.
In the engine, m_query gets memset to size '0x58', and it passes this field as reference to other functions which then access the 3 pointers. Moving the 3 pointers there made the struct size 0x58, and showed a much better disassembly. Moved these type here to reflect the changes made in the engine.
Cluster links were written with an additional padding as the struct is 11 in size, so it gets padded to 12. Cluster links now get correctly written to the disk.
Fixed writing of:
- Path nodes
- Node links
- Path clusters
- Cluster links
The previous globals 'g_pppAiNodeClusters' and 'g_pppAiNodeClusterLinks' were of type CUtlVector. These have been retyped and renamed accordingly.
Also mapped the CAI_Cluster class out slightly more.
Rebuild of path clusters and cluster links are still not correct; parsing a file in from r2, results in a different file on the disk, at the very offset the clusters are being written in (one field is off, this will be investigated soon).
Removed all extraneous copies by adding the class 'InterfaceReg' which will construct a new interface, and link it to the engine's static register. The Source Engine macro 'EXPOSE_INTERFACE_FN' will help utilizing this. The game module from the plugin is not obtained through the process environment block, so the executable is no longer sensitive to names.