3094 Commits

Author SHA1 Message Date
Kawe Mazidjatari
d5f35349a8 Decouple script function registration
Nicely decouple them. Everything server and client are now grouped as they should. The Ui namespace has been merged with Client.
2023-07-19 02:12:56 +02:00
Amos
6e223d1730 Make shared code separate
The work is partial, and does not compile.
2023-07-18 21:05:29 +02:00
Kawe Mazidjatari
95ee7ddec6 Move DLL projects to root of Solution Explorer 2023-07-18 00:18:36 +02:00
Kawe Mazidjatari
3637af34f6 Initialize the script register callbacks 2023-07-18 00:18:04 +02:00
Kawe Mazidjatari
e33b566f88 Split server and client into separate libs
Work in progress; does not compile!
Moved script registration function to static gamedll libs instead, and used a pointer callback approach for calling them to avoid duplicate symbols during linkage.
2023-07-18 00:17:49 +02:00
Kawe Mazidjatari
e7d7c47531 Make 'CClient::IsHumanPlayer' inline 2023-07-17 17:38:21 +02:00
Kawe Mazidjatari
b5f68df826 Fix rare crasher due to missing NULL check on netchan
Netchan could be NULL, add a check in.
2023-07-17 17:08:37 +02:00
Kawe Mazidjatari
b84cfc2760 Optimize CMaterialSystem::Init() for dedicated
Hook 'CMaterialSystem::Init()', and only load the 'startup.rpak' file, as that's all we need. This pak file might also not even be needed on the server, but removing this requires rebuilding 'common_early.rpak' to drop all texture/material assets and their references. The dedicated server is now also linked to a newly added 'No-DirectX' version of the materialsystem for patching.
2023-07-17 11:54:14 +02:00
Kawe Mazidjatari
e4a05b4a93 Increase oriented bone to world memory
Increase to 2MiB, so all 120 players could be rendered on the client without overflowing the bone memory (which causes an error in 'CModelRenderSystem::DrawModels').
2023-07-17 02:51:01 +02:00
Kawe Mazidjatari
f0bef4a537 Fix formatting 2023-07-17 02:48:14 +02:00
Kawe Mazidjatari
2118ee6b48 Move RPak types to public header 2023-07-17 02:40:06 +02:00
Kawe Mazidjatari
0e54190541 Add clamps to 'CC_CreateFakePlayer_f'
Make sure user doesn't create bots past MAX_PLAYERS, also clamp team number as otherwise the game would crash as well.
2023-07-16 23:49:18 +02:00
Kawe Mazidjatari
4de4f92f14 Rename bool array in CServer
This is definitely something for teams, also 126 in size. Not exactly sure what it does. All array elements appear to be set to true.
2023-07-16 23:45:51 +02:00
Kawe Mazidjatari
1fb4410792 Add 'MAX_TEAMS' define
MAX_TEAMS is confirmed to be 126.
2023-07-16 23:45:02 +02:00
Kawe Mazidjatari
b6633d73eb Add inline getters
More getters for CServer members.
2023-07-16 22:58:10 +02:00
Kawe Mazidjatari
7d64b58ea8 Reverse more members for CServer 2023-07-16 22:32:59 +02:00
Kawe Mazidjatari
46537bc338 Use atoi instead
Just silently fail, also removes a redundant std::string constructor.
2023-07-16 17:51:58 +02:00
Kawe Mazidjatari
a738e58985 Remove legacy code
The persistence enabled field was no longer needed a while ago, but never removed.
2023-07-16 13:47:07 +02:00
Kawe Mazidjatari
e6eabc2cb8 Make plugin path a define 2023-07-16 12:04:34 +02:00
Kawe Mazidjatari
f6c2d92b6b Make inline
Make inline.
2023-07-16 12:02:04 +02:00
Kawe Mazidjatari
88c9811533 Rename CServer field
This appears to be an array of persistence bools for each client instance, its still unknown what its exact purpose is.
2023-07-16 12:01:43 +02:00
Kawe Mazidjatari
db3455cbb7 Update cmodel_bsp.cpp v2.2_rc6 2023-07-15 22:03:33 +02:00
Kawe Mazidjatari
5fc38d5c96 Fix bug where map names aren't captured correctly
In rare occasions (depending on the installation path), the regex might fail to extract the level name from the VPK file name. If the path has a similar pattern, or certain characters, it will capture the wrong string. This fix has been tested, and confirmed to fix the bug.
2023-07-15 21:36:14 +02:00
Kawe Mazidjatari
e515c2d93f Don't force game into windowed mode on each launch
Let the video config decide whether or not to launch windowed.
2023-07-15 21:33:47 +02:00
Kawe Mazidjatari
1496e86273 Remove 'rui_defaultDebugFontFace' asignment
Redundant, as its defaulted to 'ArameMono' in the executable now.
2023-07-15 21:31:34 +02:00
Kawe Mazidjatari
89092a9bb8 Update navmesh build automation script
Copy levels navmeshes that have identical geometry.
2023-07-15 21:30:42 +02:00
Kawe Mazidjatari
0f11110f76 Define 'COMPILER_MSVC32' on 32bits platform 2023-07-15 19:07:58 +02:00
Kawe Mazidjatari
df5a8bdd68 SDK launcher defines cleanup
Some of its defines were located in the 'launcher' library directory, but it only contained defines for the SDK launcher, this has been moved to 'sdklauncher_const.h'. Also renamed the 'launcher_pch.h' PCH to 'sdklauncher_pch.h' to avoid confusion with 'launcher' and 'sdklauncher'.
2023-07-15 18:43:25 +02:00
Kawe Mazidjatari
6ff17557a2 Bump sigcache version
Force full rebuild
2023-07-15 17:51:56 +02:00
Kawe Mazidjatari
c46d80872a Implement launcher settings check
Discard and overwrite the settings file if the file version has changed.
2023-07-15 17:50:54 +02:00
Kawe Mazidjatari
48a8b5c36c Remove unused parameter
No longer used, removed.
2023-07-15 17:10:04 +02:00
Kawe Mazidjatari
fbe136df64 Rename command 'fs_vpk_build' --> 'fs_vpk_pack' 2023-07-15 17:03:42 +02:00
Kawe Mazidjatari
1878c92211 Merge recastnavigation/recastnavigation#619 2023-07-15 16:53:01 +02:00
Kawe Mazidjatari
e57294a1c4 Merge recastnavigation/recastnavigation#455 2023-07-15 16:49:55 +02:00
Kawe Mazidjatari
8468fe011d Merge recastnavigation/recastnavigation#645
Merged the fix, but without the catch upgrade.
2023-07-15 16:40:12 +02:00
Kawe Mazidjatari
ac6becffd8 Adjust types and format specifiers
Make it more correct.
2023-07-15 16:25:35 +02:00
Kawe Mazidjatari
d2b50065fb Fix server singleton name 2023-07-15 16:25:04 +02:00
Kawe Mazidjatari
e140d57ef6 Add 'cinttypes' header to shared PCH 2023-07-15 16:24:40 +02:00
Kawe Mazidjatari
83d7f0b9f4 Light code cleanup
- Use game's filesystem in 'Mod_GetAllInstalledMaps'.
- Reorder parameters of 'AddFilesToList', and add option to override path separator.
2023-07-15 16:24:01 +02:00
Kawe Mazidjatari
a692d122dd Fix IFileSystem::RelativePathToFullPath parameters
Argument type is a 64bit size type.
2023-07-15 16:08:15 +02:00
Kawe Mazidjatari
c5e7c3e05d Move 'CPUInformation' struct
Move to the header it actually belongs to.
2023-07-15 10:28:49 +02:00
Kawe Mazidjatari
40bcef2682 Fixup exec paths in 'build_all_vpk.cfg'
Point to new location that changed in commit afb09e1d.
2023-07-14 00:39:08 +02:00
Kawe Mazidjatari
afb09e1d05 Cleanup CFG directory
Move to dedicated subdirectories.
2023-07-13 23:15:10 +02:00
Amos
47b6b17207 Should be SDK_ARRAYSIZE 2023-07-13 08:18:28 +02:00
Kawe Mazidjatari
f6236359aa Fix debugger working directory for SDK launcher
Working directory was incorrect.
2023-07-13 00:15:37 +02:00
Kawe Mazidjatari
dca89a32d3 SDK launcher bug fixes and improvements
- Added missing implementation for 'numworkerthreads' text box.
- Swapped 'single-core server' toggle with 'processor affinity' text box.
- Performed additional light code cleanup.

The single-core dedi cvar now only gets set when 1 bit is set in the affinity mask, as that implies single core usage.
2023-07-13 00:14:47 +02:00
Kawe Mazidjatari
0de507713b Make fbits inline, and add PopCount
Floating point bitwise functions are now inline, also implemented a 'PopCount' function, which replicates the '__popcnt' instruction, but does not require the CPU to feature the instruction. This was mainly added as the SDK launcher doesn't check the CPU for SSSe3/popcnt, as it doesn't involve any instruction sets past SSE2.
2023-07-13 00:06:56 +02:00
Amos
9e899084e9 Make netchan getters/setters inline
Simple enough to be inline, also added additional assertions to methods getting from CNetChan::m_DataFlow.
2023-07-12 17:43:55 +02:00
Amos
2f209ddb60 Remove 'g_pClient' pointer
The whole array is part of the CServer class.
2023-07-12 09:14:33 +02:00
Amos
c6a9b855a2 Make simple CClient getters, inline
Small enough to be inline.
2023-07-12 09:11:31 +02:00