Properly decouple squirrel and game code. This makes it easier to reverse engineer more of this squirrel system, and to compile them as individual libraries later on when moving to CMake to significantly decrease compile times.
* Use mathlib SIMD wrappers instead, this is to maintain compatibility across different platforms/compilers.
* Moved camera distance logic to separate method.
This change was planned for a long time. This moves all REGISTER calls to a single translation unit, this is required as we currently added a very dirty workaround for not registering duplicates by checking if VFTable pointer was already present in the vector... Registering from single translation unit prevents duplicate instances that gets created if header is included by more cpp files.
Reworking this reduced 100kb+ of compiled code. This commit also reworked the way functions/variables/constant gets logged with their addresses; the new code formats them on the fly, and allows for resize at any time. Formatting is no longer required by programmer.
TODO: currently there are some compile errors for dedicated and client dll's. These will be resolved very soon as they need to be properly worked out still (server & client only stuff needs to be properly split). Use the 'main' (stable) branch for the time being if you need to compile these dll's.
* Fix null pointer dereference crash in server hitbox drawing code; implemented a proper getter for CStudioHdr.
* Moved 'baseentity.h/cpp' to 'game/server/' instead.
* Overall light cleanup.
Simulate bot user commands on the server. The simulation system is experimental and only runs if cvar 'sv_simulateBots' is set, and bots are created on the server.
Initial implementation of server movehelper. IMoveHelper interface class is fully reversed and aligns with implementation in engine. CMoveHelperServer is also reversed, excect for CGameTrace, though this isn't necessary for now.
* Added some getters in 'CBaseEntity' and 'CServerNetworkProperty'.
* Implemented 'CPlayer::SetTimeBase'.
* WIP implementation of 'CPlayer::RunNullCommand'.
Uses the same camera range cvar used by the NavMesh renderer: 'navmesh_debug_camera_range'. This allows for rendering them nicely on top of the NavMesh.
* 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.