2793 Commits

Author SHA1 Message Date
Amos
3531a4c4c6 Add missing logger context types in help 2023-07-20 08:16:53 +02:00
Amos
c257cc12c5 Make 'usercmd_dualwield_enable' replicated 2023-07-20 07:49:02 +02:00
Kawe Mazidjatari
3b661c22c8 Fix compiler warning
Fix warning 'C4189', variable 'hr' was only used in debug. The 'Assert' macro is just a stub in release.
2023-07-19 18:56:01 +02:00
Kawe Mazidjatari
a0f0b79266 Add callback for registering script constants, and added 'LISTEN_SERVER'
All listen server code should be compiled out of the scripts using 'LISTEN_SERVER'. The constant must have a non-null value.
2023-07-19 18:52:00 +02:00
Kawe Mazidjatari
80fecd2cb0 Improve help string and add a note 2023-07-19 18:50:07 +02:00
Kawe Mazidjatari
6d39d99941 Fix mistake in comment 2023-07-19 18:47:25 +02:00
Kawe Mazidjatari
193abdc18a Remove scriptfunc stubs
Not really ideal, needs a different solution.
2023-07-19 17:17:38 +02:00
Kawe Mazidjatari
ee1fdca7a9 Register admin panel/core server scriptfunc stubs for client.dll
Stubbed to avoid compile errors.
2023-07-19 16:19:34 +02:00
Kawe Mazidjatari
904352498c Fix missing 'arguments' parameter to stub macro 2023-07-19 16:18:04 +02:00
Kawe Mazidjatari
cb4a037433 Fix typo 2023-07-19 16:17:49 +02:00
Kawe Mazidjatari
ddfaea6ce2 Fix client.dll loading
* Moved dedicated server command line parameter init to 'init.cpp'.
* Registered 'SV_Main' on the client, this is engine code (lower level 'local' server wrappers).
* Disabled registration of Weapon_Bolt, although this is shared game code, this particular file is only used for the SERVER at this moment.
* Added the '-noserverdll' command lien parameter to instruct our loader.dll to load the client.dll instead.
* Adjusted the loader and sdklauncher project to support the loading of client.dll.
2023-07-19 16:00:36 +02:00
Kawe Mazidjatari
a2d30e45f9 Add asserts to detours
This is to make it easy to catch detour errors.
2023-07-19 15:53:20 +02:00
Kawe Mazidjatari
d860c43f79 Deduplicate code
Small deduplication.
2023-07-19 12:25:43 +02:00
Kawe Mazidjatari
f39de84d15 Create macro for scriptfunc definitions
Create a macro to make registration easier, by reducing the parameters.
2023-07-19 12:09:42 +02:00
Kawe Mazidjatari
e67fcfd1fb Remove static keyword
Can't be isolated to translation unit if only std::thread's ctor references it, triggers a compiler warning (C4505) that is treated as an error.
2023-07-19 02:33:22 +02:00
Kawe Mazidjatari
ad6466fa6c Add 'engine_cl' project to SDK and fix compiler errors
The 'engine_cl' library defines 'CLIENT_DLL', which prunes server specific code. This is used for the 'client.dll' project. Also fixed a compile error in 'CClient::VActivatePlayer', as it used a server only cvar. Ideally, this entire file gets ifdef'd out for engine_cl, currently it doesn't matter as nothing gets compiled in.
2023-07-19 02:30:07 +02:00
Kawe Mazidjatari
6ccf3baa5a Split server/client specific game utils
Split into their respective libraries, this is to avoid linker errors regarding undefined symbols.
2023-07-19 02:27:28 +02:00
Kawe Mazidjatari
54536a2652 Parameterize changelevel or map in CServerListManager::LaunchServer()
Parameterized; whether or not to drop all clients (map = drop, changelevel = keep).
2023-07-19 02:21:58 +02:00
Kawe Mazidjatari
6cecc3297e Move KeepAlive function to HostState
Only used in HostState, moved to HostState with static linkage.
2023-07-19 02:19:43 +02:00
Kawe Mazidjatari
7455d4da2d CPylon: add getters and setters for error/token fields 2023-07-19 02:17:28 +02:00
Kawe Mazidjatari
6bb622314e Improve persona name validations
Move all server convars out of the EbisuSDK lib, the min/max name len are now parameterized. This also makes it possible to use the code on the client if ever needed.
2023-07-19 02:16:06 +02:00
Kawe Mazidjatari
dccb897c27 Make 'sv_usercmd_dualwield_enable' server and client
Must be for server and client, as its used in shared code.
2023-07-19 02:14:09 +02:00
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 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