243 Commits

Author SHA1 Message Date
Kawe Mazidjatari
4095424b7c Add clock/time function patterns
Added:
* Sys_GetProcessUpTime
* Plat_FloatTime
* Plat_MSTime
2022-06-20 14:58:53 +02:00
Kawe Mazidjatari
f98a575dfa Fix S1 compiler errors 2022-06-18 21:24:02 +02:00
Kawe Mazidjatari
034df40755 CClient::GetClient improvements 2022-06-16 18:04:43 +02:00
Amos
39dd70f929 Update client.cpp comments
client.cpp (holding CClient) is in 'engine/client' based on asserts from the game module
2022-06-15 13:33:47 +02:00
Amos
ae35dd1b8b Revert 'Using __FUNCTION__ in host_state.cpp'
Scopes don't get compiled with inline methods using '__FUNCTION__'.
2022-06-15 13:31:43 +02:00
PixieCore
fced5f7adf Fix compilation. 2022-06-15 12:23:31 +02:00
PixieCore
93bb43544d Using __FUNCTION__ in host_state.cpp 2022-06-15 12:22:46 +02:00
PixieCore
15f6fd3123 Few comments 2022-06-15 11:59:37 +02:00
Kawe Mazidjatari
e711c54bf9 DebugOverlay improvements
Use rebuild 'DestroyOverlay()'
Use 'size_t' type for MemAlloc_Internal alloc size.
2022-06-15 01:35:48 +02:00
Kawe Mazidjatari
e70e4d1a8c Add DebugOverlay implementation 2022-06-15 01:24:29 +02:00
Kawe Mazidjatari
61e1180878 Rename type
Type is small enough where auto isn't needed
2022-06-14 22:33:01 +02:00
Kawe Mazidjatari
ff59db1b95 Light improvements
Update comments.
Proper type for 'user_creds::m_nUserID'.
Proper type for 'CClient::SetUserID'.
Added 'CClient::SetHandle'.
2022-06-14 21:53:03 +02:00
Kawe Mazidjatari
c708d73c02 Improve comments 2022-06-14 21:43:32 +02:00
Kawe Mazidjatari
e5f412bcb2 CClient improvements
Mapped out new fields in CClient
2022-06-14 21:41:35 +02:00
Kawe Mazidjatari
ebf4921063 Ban system improvements
NucleusID/OriginID is an unsigned type, changed all types to uint64_t and cleaned up redundant code.
2022-06-14 20:56:55 +02:00
Kawe Mazidjatari
7c0c541405 FileExist cleanup
Use fs::path constructor for all strings.
Renamed CPakFile::AsyncLoad to CPakFile::LoadAsync.
Renamed CPakFile::Load to CPakFile::LoadPak.
2022-06-12 12:40:26 +02:00
Kawe Mazidjatari
aa29c3df18 Fix server browser bug
Fixed bug where map list would contain multiple same entries when server vpk's are installed among the client ones.
2022-06-06 16:46:09 +02:00
Kawe Mazidjatari
84f6f37721 Rename unknown parameter
Unkmown parameter was socket (pServer + 0xC).
2022-05-28 23:36:29 +02:00
Kawe Mazidjatari
7bc18c8012 Align CServer structure with game's memory
Unknown fields have been padded to match the structure's size in memory. Iteration is now possible.
2022-05-28 23:14:01 +02:00
Kawe Mazidjatari
61c7dbf5c1 Fix memory leaks 2022-05-28 23:05:10 +02:00
Kawe Mazidjatari
e5e0d528f0 Parse playlists file directly after loading it
No longer need a thread that loops and waits until its loaded into memory before parsing it.
2022-05-28 17:07:30 +02:00
Kawe Mazidjatari
79d602c274 KeyValues class rebuild (see description)
Class has been mostly copied from the Valve SourceSDK.
Modified to fit this particular engine.

Modifications include:
* More consistent naming.
* Using c++ style casts over c style casts.
* Using c++ datatypes for assigning default.
  - nullptr and size_t for pointers and size types.
2022-05-28 16:31:38 +02:00
Kawe Mazidjatari
52b8755219 FileSystem improvements
* Added proper pointer to g_pFileSystem_Stdio.
* Renamed existing one to g_pFullFileSystem (correct name).
* Obtain g_pFileSystem from the same constructor as g_pFileSystem_Stdio.
2022-05-27 22:38:49 +02:00
Kawe Mazidjatari
5aeac9f72a rename 'g_szNetKey' to 'g_svNetKey'
sv = string variable
2022-05-27 02:24:34 +02:00
Kawe Mazidjatari
fc74a692fa Prefix global vectors with 'g_v' 2022-05-27 02:21:54 +02:00
Kawe Mazidjatari
47d2e4c915 See description
* Added new function 'GetAvailablePlaylists' to all VM's.
* Moved function 'GetAvailableMaps' from UI VM to all VM's.
* Improved logic behind 'GetAvailableMaps'.
* Server browser and SQVM now rely on 'MOD_GetAllInstalledMaps'. This new function populates the global vector 'g_vAllMaps' with all installed maps.
* Improved 'KeyValues' structure to use union for shared members.
2022-05-27 02:08:51 +02:00
Kawe Mazidjatari
2f4f4ae838 Merge branch 'gui_launcher' into indev 2022-05-26 22:05:32 +02:00
Kawe Mazidjatari
7833eb9b1d Load ui_sdk.rpak upon init
Load ui_sdk.rpak after ui_mp.rpak.
Moved the loading of common_sdk.rpak to after common_sp.rpak/common_mp.rpak.
This should allow overriding existing assets.
2022-05-26 02:58:46 +02:00
Kawe Mazidjatari
c406147261 Load common_sdk.rpak upon init
The pak gets loaded before common_sp.rpak/common_mp.rpak gets loaded (this could be changed to after if needed).
2022-05-26 02:26:48 +02:00
Kawe Mazidjatari
4b72afb74f Light refactor for logging
Moved logging functions to dbg.h (tier0) and export them from the dll.
Added additional functions for checking bad pointers (debug only!).
Reduced output code size.
2022-05-25 14:18:29 +02:00
Kawe Mazidjatari
4eaba9f5a2 Gui launcher work
Improved theme
Implemented dedicated server and client logic (gui side only)
2022-05-25 12:07:08 +02:00
Kawe Mazidjatari
dacd307663 See description
* Finished designer code for launcher gui.
* Basic implementation of setting flags for host launch option.
* Check in 'CHostState::LoadConfig' if -launcher is below 1.. if condition is met the cfg's will be executed from 'CHostState::LoadConfig'.
* Added 'StringIsDigit' utility.
2022-05-24 02:23:37 +02:00
Kawe Mazidjatari
62f3108909 Cleanup 'NET_DisconnectClient()' 2022-05-21 18:56:56 +02:00
Kawe Mazidjatari
a75aa33cc3 More consistent member variable names 2022-05-21 12:42:46 +02:00
Kawe Mazidjatari
52883808e1 Reversed CServer structure (almost complete). See desc
* Mostly rebuild CServer structure.
* Partially rebuild CNetworkStringTable structure.
* Partially rebuild CNetworkStringTableContainer structure.
* Removed redundant patterns which are now covered in the data structure.
2022-05-20 20:14:39 +02:00
Kawe Mazidjatari
efb7c36408 Light project restructure
Moved server/client headers and implementations into dedicated subfolder.
Renamed Some classes to match the game binary (e.g. CBaseClient is now CClient).
Removed redundant files.
2022-05-20 11:52:19 +02:00
Kawe Mazidjatari
72a2d07e66 Improve dedicated server performance
Prevent 'CClientState::Disconnect()' from being ran in 'Host_Disconnect()'.
2022-05-20 10:16:21 +02:00
Kawe Mazidjatari
cb5f7cd1b0 Fix pattern for 'SV_ShutdownGameDLL()'
Now backwards compatible with older builds (function prototype changed).
2022-05-20 01:59:24 +02:00
Kawe Mazidjatari
0fa525c717 Fix CHostState structure alignment for builds below S3
Static level name array size has been increased from 32 bytes to 64 bytes in S3
2022-05-20 01:40:44 +02:00
Kawe Mazidjatari
93b7a21849 Uppercase to lowercase for address logging 2022-05-20 01:08:09 +02:00
Kawe Mazidjatari
8816a28372 SQVM cleanup
The SDK could now obtain context index for builds before S3
2022-05-19 02:19:43 +02:00
Kawe Mazidjatari
6bd1643dfb Fix SDK for S1 bin 2022-05-18 02:04:37 +02:00
Kawe Mazidjatari
32487b4230 Fix SDK for S2 bin 2022-05-18 01:00:46 +02:00
Kawe Mazidjatari
ddfdb4ffd8 See description
Add '-nodiscord' and '-nobakedparticles' to launch params for dedicated.
Add hook for 'MemAlloc_Internal()'.
Rename loggers to be more consistent with naming.
Revert omitting frame pointers.
2022-05-17 23:00:30 +02:00
Kawe Mazidjatari
64abf323ec Update baseclient.h 2022-05-17 02:38:17 +02:00
Kawe Mazidjatari
bc94820b29 CBaseClient backwards compatibility 2022-05-17 02:37:48 +02:00
Kawe Mazidjatari
291ca3700d Update CBaseClient struct 2022-05-17 02:28:16 +02:00
Kawe Mazidjatari
325b3d15dc Cleanup 2022-05-17 01:31:49 +02:00
Kawe Mazidjatari
637041d5e7 Use 'fs' instead of 'std::filesystem' 2022-05-16 21:54:46 +02:00
Kawe Mazidjatari
6dff43bc75 Move and rename ConCommand callbacks appropriately 2022-05-16 21:15:25 +02:00