592 Commits

Author SHA1 Message Date
Amos
a5da2e81bf RCON improvements (see description)
** SERVER **
* Close redundant connections if max sockets have been reached.
* Ban if client keeps spamming without authing first (ignoring message).
* Check for whitelisted address before issuing bans (whitelisted address in ConVar 'sv_rcon_whitelist_address' will never get banned or get its connection terminated.
* Transmit SQVM and DevMsg logs over the wire to the net console.

** NETCON **
* IPv6 support.
* Close connection properly after FIN request.
* Prompt user to reconnect after connection has been terminated instead of closing the application.
* Add proper quit command.

** SDKLAUNCHER **
* Rename to 'launcher.exe' to describe its purpose better. Our logo gets printed nice and large on the console during startup.

** SDK **
* Cleanup.
2022-02-08 16:32:00 +01:00
Amos
d555c39434 Rename to 'cmd' 2022-02-06 17:06:22 +01:00
Amos
c187bed4c5 RCON implementation (see description)
* Fully rewritten protocol agnostic CNetAdr class
* Fully rebuilded legacy CNetAdr class
* Fully rebuilded dual-stack CSocketCreator class
* New project "netconsole" added (lightweight netconsole for RCON)

RCON is still work in progress
2022-02-06 16:48:52 +01:00
Amos
f51bd431f4 Add comment regarding exception 2022-02-06 16:30:05 +01:00
Amos
3a852b63d2 Fix Engine Error bug 2022-02-06 15:43:05 +01:00
Amos
f488b7e75e Load 'server' VPK's instead if the dedicated server is a standalone dedicated server
* Load server VPK's instead of client VPK's on standalone servers
* Dynamically search for 'g_bDedicated' global boolean instead of hardcoded address
* Add 'PatchString' to memory class
2022-01-26 23:45:58 +01:00
IcePixelx
9b814d545d Comment position adjusted. 2022-01-23 18:34:22 +01:00
IcePixelx
2f82801261 Moved CEngine class functions to sys_engine.cpp. 2022-01-23 18:33:01 +01:00
IcePixelx
f43c5da8ae Huge engine/host commit.
* Rebuild CModGroupApp::Main, did not include the dedicated routine with the empty class global.
* Using a template function now for virtual function calls
* Implemented most of the CEngine class and grabbing its global var now.
* Using local CEngine now in FrameUpdate
* Implemented EngineParms_t fully and grabbing its global var.
* Added macro for adding class member variables at offsets.

A lot of comments added regarding what needs to be done for this commit.

* Check other season compability, wasn't able to do that due to not having access to said binaries at the moment.
* Fix sdklauncher to use widestrings to fix the bug with other languages in path
2022-01-23 18:26:48 +01:00
Amos
3f50736e48 Light cleanup 2022-01-22 15:42:35 +01:00
IcePixelx
c3171b6ad4 Gotta use server remote checksum in hoststate. 2022-01-20 16:09:58 +01:00
Amos
3be02f949b Add remote function calls checksum for server 2022-01-20 16:04:10 +01:00
Amos
24dd364ebf Execute 'autoexec' and 'autoexec_dev' after server and client to override any ConVar's more easily 2022-01-20 03:10:01 +01:00
Amos
df3bfafce6 Register ConCommands as early as possible 2022-01-19 23:46:14 +01:00
Amos
540e219c22 Clamp Autocomplete window properly
* Fixed cases where the horizontal scrollbar would conceal the only item in the autocomplete window

* Add new ConVar to show help text next to ConVar in autocomplete. disabled by default to prevent it from being cluttered.
2022-01-19 19:03:04 +01:00
Amos
381b97eb65 Remove unnecessary include
basetypes.h is now precompiled
2022-01-16 01:40:27 +01:00
Amos
b9af86b9c1 Implement terminal utilities for Windows console + add new colors for various output variations
* Add new SDK launch logo.
* Remove ansi-color coding from in-game console and file loggers.
* Improve console colors for Windows.
* Implement various string utilities.
* Implement various terminal utilities.
2022-01-16 01:33:07 +01:00
Amos
1c5df4e178 Ansi terminal color support + big optimizations on all log systems + 'Warning()' hook
* Ansi colors can now be enabled with the '-ansiclr- flag.
* All loggers have been optimized and are all initialized only once at process startup.
* New hook for 'Warning()' print function with warning level.
2022-01-14 20:48:16 +01:00
Amos
de3b3f53bd Optimizations + QoL improvements/cleanup
* IConsole overlay now clears the oldest log entries to stay under the vector limit instead of clearing the whole vector.
* IConsole code cleanup.
* IBrowser code cleanup, reordered class methods.
* Use ConVar utilities to get/set values for strings in IBrowser and IConsole.
* New ConVar's for RUI console overlay to tweak colors.
2022-01-12 02:56:17 +01:00
Amos
44102abbcc Execute dev configs when '-devsdk' parameter is passed 2022-01-10 02:47:19 +01:00
Amos
c0f24e64ff Rename global cvar pointer 2022-01-10 01:31:25 +01:00
Amos
64c07af6e0 Cleanup to use new ConVar utilities 2022-01-09 17:17:05 +01:00
Amos
c292d8ad46 Implement new ConVar features
Slight cleanup with new ConVar features to be used throughout the SDK
2022-01-09 16:18:35 +01:00
Amos
0177c17da9 Draw simulation stats and GPU stats to debug text overlay 2022-01-09 16:14:41 +01:00
IcePixelx
21a10e201b Typos. 2022-01-09 14:36:22 +01:00
IcePixelx
ae09372cc7 Pylon system changes. 2022-01-09 14:35:43 +01:00
Amos
98a428ace9 Fix S2 crash when launching a different version 2022-01-07 01:03:41 +01:00
Amos
d52bd5eeec Initial support for S1 2022-01-05 23:02:20 +01:00
IcePixelx
7c3994dfc2 dedicated refuselist 2022-01-05 19:23:53 +01:00
Amos
c486c2d593 Portability to S2 completed
CServer functions are evolving quite heavily over these seasons, so these need a bit of work
2022-01-05 02:11:21 +01:00
Amos
fbcea85631 Fix compiler error caused by merging commits from different branches 2022-01-04 12:11:59 +01:00
Amos
84e7729ca0 Add client and debug utilities + cleanup 2022-01-04 11:56:31 +01:00
Amos
22c0b5c867 Dedicated server improvements 2021-12-30 17:20:47 +01:00
Amos
6d4f7e345f Fix a typo 2021-12-30 02:47:46 +01:00
Amos
39a8a8fd30 Implement patch to enable 'DrawAllOverlays()'. 2021-12-30 02:36:43 +01:00
Amos
6a9a00735a Rename hooked command callbacks 2021-12-29 13:57:16 +01:00
IcePixelx
0228f59062 Added indev Pylon(MasterServer) broadcasting to dedi. Read description for further information.
Dedicated RemoteFunctionCallsChecksum needs fixing because its currently always null.
Hidden needs to be implemented. I wouldn't say its needed currently till the Pylon re-write hits indev branch.
2021-12-28 02:23:13 +01:00
IcePixelx
f6a4b011f0 ConVar/ConCommands improvements. 2021-12-28 01:14:56 +01:00
IcePixelx
f5208d2b61 Fixed NET::ShutDown recursive calling, fixed decompressed patch header size on decompress. 2021-12-27 20:44:37 +01:00
Amos
69161ae6c0 Implement RTech_AsyncLoad hook and concommand
The ConCommand 'rtech_asyncload' allows the user to load specific pak files on-demand.
2021-12-27 16:53:35 +01:00
IcePixelx
c90d3184ea Aligning. 2021-12-26 04:14:28 +01:00
Amos
d5b2e58dae Code base refactor + major performance and readability improvement. Read description for details.
* Codebase restructured to SourceSDK codebase style and .cpp/.h assertion paths in the game executable.
* Document most functions with valve style 'Purpose' blocks.
* Rename variables to match the rest of the codebase and Valve's naming convention.
* Dedicated DLL and the SDKLauncher now share the same codebase as the DevSDK.

* Obtain globals or pointers directly instead of waiting for runtime initialized data.
* Dynamically search for all functions and globals (this doesn't count for dedicated yet!).
* Initialize most in-SDK variables.

* Move certain prints and other utilities under ConVars to reduce verbosity and increase performance.
* Print all pattern scan results through a virtual function to make it easier to add and debug new patterns in the future.
* Type global var pointers appropriately if class or type is known and implemented.
* Forward declare 'CClient' class to avoid having 2 'g_pClient' copies.
* Add IDA's pseudo definitions for easier prototyping with decompiled assembly code.

* RPAK decompress Command callback implementation.
* Load decompressed RPaks from 'paks\Win32\' overriding the ones in 'paks\Win64\' (the decompress callback will automatically fix the header and write it to 'paks\Win32\').

* VPK decompress Command callback implementation.
* Move CRC32 ands Adler32 to implementation files.

* Server will print out more details about the connecting client.

* Upgrade ImGui lib to v1.86.
* Don't compile id3dx.h for dedicated.
* Don't compile id3dx.cpp for dedicated
* Implement DevMsg print function allowing to print information to the in-game VGUI/RUI console overlay, ImGui console overlay and the external windows console

* Fixed bug where the Error function would not properly terminate the process when an error is called. This caused access violations for critical/non-recoverable errors.
* Fixed bug where the game would crash if the console or server browser was enabled while the game was still starting up.
* Several bug fixes for the dedicated server (warning: dedicated is still considered work-in-progress!).
2021-12-25 22:36:38 +01:00