2980 Commits

Author SHA1 Message Date
Kawe Mazidjatari
79910b0859 Add ability to skip POPCNT and SS(S)E 3 CPU extension tests
Experimental, but this should allow for running the game or dedicated server on a select few CPU's that appear to have SSSE 3, but not POPCNT. Still needs testing if it actually does work after emulating POPCNT instructions.
2023-07-23 02:32:03 +02:00
Kawe Mazidjatari
af81954b7f Force 'Cbuf_GetCurrentPlayer()' inline
FORCEINLINE will compile this down to an immediate.
2023-07-22 21:15:01 +02:00
Kawe Mazidjatari
21f64bc572 Adjust logging contexts
Adjust the context properly, some were wrong (e.g. 'ENGINE' in 'COMMON' code).
2023-07-22 21:14:04 +02:00
Kawe Mazidjatari
36376e3b2f Rename 'con_suggestion_*' cvars to 'con_suggest_*'
Matches the suggest class name more.
2023-07-22 15:01:00 +02:00
Kawe Mazidjatari
00f349c745 Use ICVar iterator for console partial suggest
Added public interface to ICVarIteratorInternal, this class also deals with the deletion of the iterator. This fixes the problem of cvars not showing up that have been registered after 'CModAppSystemGroup::Create()' has been called. Currently, no cvar is registered after it. This will/could change when the plugin system is utilized.

Additional changes:
- Cvar 'con_suggestion_flags_realtime' has been removed, as we no longer keep an early copy anymore; real time flags are always shows from now on.
 - Fixed a bug in 'CConsole::FindFromPartial()' where we would return in the loop when 'm_vSuggest.size() >= con_suggestion_limit->GetInt()', instead of breaking out, which skips the element sorting process.
2023-07-22 14:51:15 +02:00
Kawe Mazidjatari
9e50266649 Update format specifier
Use %lu.
2023-07-22 14:42:44 +02:00
Kawe Mazidjatari
15c293126e Use fast tolower/toupper defines instead 2023-07-22 14:40:47 +02:00
Kawe Mazidjatari
cb7d1b3709 Normalize module names
All lowercase.
v2.2_rc7_tournaments
2023-07-20 22:23:10 +02:00
Kawe Mazidjatari
e7a4a6f161 Make 3 versions of SigCache files
The 3 versions are now:
- cfg/server/startup.bin
- cfg/client/startup.bin
- cfg/startup.bin

The last one is used by the GameSDK. Bumped header version to 6.
2023-07-20 22:16:21 +02:00
Kawe Mazidjatari
319b534d62 Enable plugin system
Plugin system works and is stable.
2023-07-20 22:00:00 +02:00
Kawe Mazidjatari
c1bdb54b6b Remove asserts from Microsoft Detours wrappers
Intermittently causes compile errors, the asserts should be added in the implementation file instead.
2023-07-20 21:59:25 +02:00
Kawe Mazidjatari
38785bfc9b Fix kick/ban script function parameters
It requires a second parameter, as this contains the reason text.
2023-07-20 21:45:38 +02:00
Kawe Mazidjatari
e8e600f553 Add missing convar flags
Added:
- FCVAR_ACCESSIBLE_FROM_THREADS [1<<25]
- FCVAR_STUDIO_SYSTEM [1<<26]
- FCVAR_SERVER_FRAME_THREAD [1<<27]
- FCVAR_PLATFORM_SYSTEM [1<<31]

This commit also removes the 'FCVAR_MATERIAL_THREAD_MASK' from the ConVarFlags class (which is a helper struct for displaying flags on the developer console), as this is a mask and would therefore be marked as such in case a single bit in the mask matches, and all these bits are already added to the list.
2023-07-20 21:02:27 +02:00
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
20bffe4158
Merge pull request #104 from Mauler125/client_dll
Client dll
2023-07-19 20:16:37 +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