2463 Commits

Author SHA1 Message Date
Kawe Mazidjatari
552f5f750c Fix crash in 'CClient::ActivatePlayer'
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.
2023-05-15 17:19:18 +02:00
Kawe Mazidjatari
9a9813512c Add AVI public headers to CMakeLists 2023-05-15 15:01:25 +02:00
Kawe Mazidjatari
11864f8902 Add all public headers to CMake projects
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.
2023-05-15 14:47:03 +02:00
Kawe Mazidjatari
a421a2bdec Regroup VGui projects
Moved under 'System'.
2023-05-15 09:54:43 +02:00
Kawe Mazidjatari
d5f3228ab0 Fix intermittent bug in server browser
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.
2023-05-15 09:54:18 +02:00
Kawe Mazidjatari
f943fe8509 RecastMesh.cpp: Fix compiler warning
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.
2023-05-15 09:51:27 +02:00
Kawe Mazidjatari
310264c66d RecastMeshDetail.cpp: Fix compiler warning
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.
2023-05-15 09:46:51 +02:00
Kawe Mazidjatari
9f44bcc818 Treat compiler warnings as errors
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.
2023-05-15 09:44:26 +02:00
Kawe Mazidjatari
0138ac025f Fix bug when trying to print the host token
Should return ptr to string (caught from compiler warnings).
2023-05-15 00:54:33 +02:00
Kawe Mazidjatari
852d48256e Fix compiler warnings from tier0
Function with internal linkage has no references, and is getting removed.
2023-05-15 00:53:46 +02:00
Kawe Mazidjatari
6a86ae2606 Cleanup CMakeLists files
Light cleanup in CMakeLists files. Split protocols and improve filter names.
2023-05-14 17:36:08 +02:00
Kawe Mazidjatari
c50f8d86f6 Add option for GameDLL version and source directory
Options could be set from the CMake GUI. By default, GameDLL version is set to 'GAMEDLL_S3', and engine source directory is set to 'r5dev/'.
2023-05-14 16:27:31 +02:00
Kawe Mazidjatari
78c80faf7d Fix S0/S1 compiler error
Update name.
2023-05-14 16:22:44 +02:00
Kawe Mazidjatari
7078a8b10a Fix syntax error
Fix small syntax error in post build event code.
2023-05-14 12:07:25 +02:00
Kawe Mazidjatari
d8ac2852ba Regenerate 'build.txt' after DLL project builds
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.
2023-05-14 12:03:16 +02:00
Kawe Mazidjatari
b3fc2c5adb Enable profiling for Profile builds
Enable linker option for profiling.
2023-05-14 02:28:53 +02:00
Kawe Mazidjatari
ae108ef1cc Light CMakeLists cleanup
Use global var for PCH name instead.
2023-05-14 02:27:54 +02:00
Kawe Mazidjatari
7248c8aab7 Fix compiler warning
Use size_t instead to avoid the type truncation warning.
2023-05-14 02:11:29 +02:00
Kawe Mazidjatari
d809a9f633 Use PCH generated from VPC globally
This reduced output code size with 40KiB, improved compile times and appeared to improve runtime performance as well.
2023-05-14 02:10:17 +02:00
Kawe Mazidjatari
b57eb0c0c3 Set runtime directories for projects
Adjust the runtime directories, so they are identical to pre-cmake port.
2023-05-14 01:27:51 +02:00
Kawe Mazidjatari
ede19e0472 Improve CMake macro's
Allow setting custom runtime output directories using the 'end_sources' macro. If parameter is empty, it will use "game/" (default).
2023-05-14 01:26:17 +02:00
Kawe Mazidjatari
59d8f970da Cleanup PCH files
Decoupled them to improve compile times.
2023-05-14 01:24:33 +02:00
Kawe Mazidjatari
5577d4fe87 Use dedicated PCH for sdklauncher
SDKLauncher now uses its own PCH.
2023-05-14 01:23:31 +02:00
Kawe Mazidjatari
0a0552d75c Fix verbose compiler warning
This is getting set from CMake now.
2023-05-14 01:21:35 +02:00
Kawe Mazidjatari
904976e4f5 Move shared files from server 2023-05-13 22:54:15 +02:00
Kawe Mazidjatari
44e08be6d9 Add missing library to PluginSDK
PluginSDK also uses SpdLog for the logger callback sink.
2023-05-13 20:04:11 +02:00
Kawe Mazidjatari
67fb566dfb Compile launcher as separate library again 2023-05-13 20:03:42 +02:00
Kawe Mazidjatari
2fd62b7091 Enable LTCG for executables and shared libraries
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.
2023-05-13 19:44:41 +02:00
Kawe Mazidjatari
0c25246f91 Check if dedicated using global
Global instead of directive as the ebisusdk lib is used for both the server and client. Removed useless directives.
2023-05-13 19:41:57 +02:00
Kawe Mazidjatari
e468fa1065 Fix build errors caused by 'CreateTextureResource'
Moved declarations to source file; this is currently only used by the engine.
2023-05-13 19:40:41 +02:00
Kawe Mazidjatari
81182f078b Fix missing deref in launcher.cpp
Pointer should be dereferenced.
2023-05-13 19:39:53 +02:00
Kawe Mazidjatari
934819574b Fix missing lib in GameSDK and ClientDLL
Lib was commented, but should be part of the client only libs; moved.
2023-05-13 19:39:17 +02:00
Kawe Mazidjatari
c96ca324c9 Set plugin stack reserve size
Set it to that of the game exe.
2023-05-13 19:38:32 +02:00
Kawe Mazidjatari
04ed774c46 Swap preprocessor directive with global
Since launcher does not get compiled with the engine, the dedicated check has to be performed using the global instead.
2023-05-13 18:07:05 +02:00
Kawe Mazidjatari
ab3abce664 Remove preprocessor directives
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).
2023-05-13 18:06:00 +02:00
Kawe Mazidjatari
3a4ce7cf02 Comment unused function pointer (NULL on dedi)
Not getting used anywhere, and was NULL on dedi.
2023-05-13 18:04:30 +02:00
Kawe Mazidjatari
8d38de1ce0 Move client only code from rtech libraries
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.
2023-05-13 18:03:48 +02:00
Kawe Mazidjatari
d9cc37914a Add server and client DLL to CMake projects 2023-05-13 17:48:19 +02:00
Kawe Mazidjatari
b94a9dcd7c Add dedicated server engine library
Added to CMake projects.
2023-05-13 17:48:00 +02:00
Kawe Mazidjatari
de02febdc0 Fix assert failure in netconsole caused by AddDetour
Remove extraneous register call for detour callbacks.
2023-05-13 14:05:08 +02:00
Kawe Mazidjatari
08384346bf Setup log callback sink for netconsole 2023-05-13 14:04:13 +02:00
Kawe Mazidjatari
8b60300dce Guard mathlib debug globals
Only compile when 'DEBUG_MATHLIB' is set.
2023-05-13 14:03:42 +02:00
Kawe Mazidjatari
84c43cffa8 Properly setup netconsole CMakeLists 2023-05-13 14:02:47 +02:00
Kawe Mazidjatari
7ef50395eb Remove unused header file 2023-05-13 14:02:16 +02:00
Kawe Mazidjatari
f22504f095 Enable whole program optimization for naveditor
Libs use them under the same PCH.
2023-05-13 12:11:02 +02:00
Kawe Mazidjatari
fdfc0a748b Remove extraneous project 2023-05-13 12:10:32 +02:00
Kawe Mazidjatari
e5a455e7c7 Apply whole program optimization for certain targets
Only applied to certain targets to prevent bombing compile times; other projects don't really benefit of this.
2023-05-13 11:57:57 +02:00
Kawe Mazidjatari
5ba0beab40 Set stack reserve size for GameSDK project
Should match that of the game executable.
2023-05-13 10:46:54 +02:00
Kawe Mazidjatari
1ef573a9b2 Fix compile errors on Visual Studio 2017
Error: ''std::isdigit': no matching overloaded function found'.
2023-05-13 10:35:05 +02:00
Kawe Mazidjatari
d7ef449e15 Split RTech libraries 2023-05-13 10:34:23 +02:00