Added option: /Zf (Faster PDB generation); this was required as we enabled /MP. Without this, the compiler regularly fails to create a PDB.
Added option: /EHsc (Standard C++ exception handling).
This should fix a rare crash that happens when the playlists file is reloaded during disconnect. The client fetches the playlists from the server on connect. On disconnect, we want to reload the one from the client so that if the player want's to create his own game, that he would have his own playlists. The fix is to delay the reload of the playlists file to the beginning of the next frame.
Properly fix the aligned memalloc singleton in the SDK; the implementation now uses a callback based approach for calling the allocator and deallocator.
Use 'std::lock_guard' for mutex management. Also fixed a compiler warning that got triggered by having a mutex unlock placed at an unreachable code path in 'CGaussianRandomStream::RandomFloat'.
Set the persistence fields to 'ready' in 'CClient::ActivatePlayer', before executing the rest of the function. Previously, it was set in 'CVEngineServer::PersistenceAvailable', but this is too late. The function 'FairFight_Init' was actually 'CClient::ActivatePlayer', and thus it has been moved to the correct file, and the old file defining it previously has been removed.
Added all public headers to CMake projects, also moved some files around in the public directory. Translation units have been moved to the libraries that were responsible for implementing them, as this game is monolithic.
On some compile runs, the 'LoadTextureBuffer' call is getting optimized out as 'ret' is only used for the assert statement, but on release, the assert statements does nothing and thus the compiler got rid of the call. This code should not be fired in this function, but rather in the initialization routine anyways. The code has been moved to 'CBrowser::Init', and the issue has been fixed.
2 warnings:
Operation 'lkup[arr[i] & 0xF] | 0x8000;' returns an int, but should return a unsigned short; added explicit cast.
Operation 'arr[i] & 0xF' could read up to 64 bytes, while the stack buffer is only 16 bytes. Switched to operation: ''arr[i] & 0x3'.
The static buffer has also been declare const now.
Function 'updateLeftFace' is static, and when 'REVERSE_DIRECTION' is set to 1, its not getting used anywhere leading to a compiler warning as it has internal linkage with no references, and thus its getting pruned. Only define the function when 'REVERSE_DIRECTION' is 0.
Treat them as errors globally. Most of the time a warning is a bug, or problem in code that could be solved in a different (better) manner. Thirdparty code have this disabled. The warnings as errors option can be globally disabled through the CMake GUI, but this is not recommended.
This post build event function regenerates the 'build.txt' file after compiling the engine projects. It takes the branch name, commit hash (short), current time and time designator.
Enable Link Time Code Generation as some libraries are compiled using /GL (Whole Program Optimization) which requires the code generation to be delayed to link time. Not doing this will result in longer build times, as the linker has to terminate its progress if it links a library compiled with /GL, and restart this operation using /LTCG.
These preprocessor directives are invalid, as 'vscript' gets compiled as a standalone library. Compile everything (this doesn't cause an issue if its on the server or client).
Moved, and renamed to 'CreateTextureResource'. Reason for move was that the rtech libraries is used by server and client, and using this on dedicated requires linking directx libraries, as it has to be hooked (even when not used). Moved to client only code to avoid having to hook it. Material system is no longer linked to the dedicated server module, as nothing from it was getting used.