240 Commits

Author SHA1 Message Date
Amos
ee82a58133 Create RCON ConCommand 2022-02-06 15:59:46 +01:00
Amos
70a5f77121 Create RCON ConVar's 2022-02-06 15:54:52 +01:00
IcePixelx
2037ffa1f2 convar creation suggestion. 2022-01-29 18:00:29 +01:00
Amos
65299affa1 Fix issue where connected clients could kick/ban players
This was caused by a bad mistake I made when setting flags for ConVars and ConCommands.

Set 'IsFlagSet()' query debug ConVars as Replicated.
2022-01-28 01:32:27 +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
a1f96797c0 Console and Browser UX improvements
* Log warnings
* Improve style
* Vector size is now controlled by ConVar instead
* Keep current item in view when console is cleaning up the vector. This doesn't work ideally as its hard to keep track of the current item, and the scroll is a float. In the future it might be better to grab the first vertex of the center line on the console and track that perhaps.
2022-01-22 15:51:09 +01:00
Amos
7419720f78 Rename ConVar to make more sense + cleanup 2022-01-20 00:59:31 +01:00
Amos
963c189f35 Reset scroll position when AutoSuggest has updated 2022-01-20 00:24:41 +01:00
Amos
f418d36e1b Add flags to registered ConCommands 2022-01-19 23:46:03 +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
2bb02acd60 Implement autocomplete logic for in-game console.
Autocompletes based on user input.
Also shows ConVar's current value.
2022-01-17 23:21:43 +01:00
Amos
d21a947474 Fix hardcoded array size
Forgot about this one..
2022-01-16 03:26:19 +01:00
Amos
381b97eb65 Remove unnecessary include
basetypes.h is now precompiled
2022-01-16 01:40:27 +01:00
IcePixelx
829e122cea SQ Serverbrowser V1 push. Clean-up following after @r-ex fixed SQ things. 2022-01-15 15:25:19 +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
38d9d431c9 Fix potential bug where 'cm_return_false_cmdquery_all' cvar would never work 2022-01-10 02:03:31 +01:00
Amos
c0f24e64ff Rename global cvar pointer 2022-01-10 01:31:25 +01:00
Amos
0146f22e0a Implement CommandLine utilities 2022-01-10 01:20:44 +01:00
Amos
64c07af6e0 Cleanup to use new ConVar utilities 2022-01-09 17:17:05 +01:00
Amos
19f5010bd2 Fix compiler error + rename debug dll's
Rename for easier debugging and config separation
2022-01-09 16:29:36 +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
Amos
d52bd5eeec Initial support for S1 2022-01-05 23:02:20 +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
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
899bde2af0 Add comments. 2021-12-27 21:30:04 +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
e03d74b753 Rename RTech decompression methods 2021-12-27 16:58:07 +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
54e07952e1 Fixed compilation. 2021-12-27 14:17:34 +01:00
Amos
a87eee1818 Fix bug where FCVAR_CHEATS gets stripped regardless of intention 2021-12-27 02:23:03 +01:00
IcePixelx
15bfffdd0f Fixed typo. Properly mask off cheats and dev from concommands and convars. 2021-12-26 22:58:28 +01:00
IcePixelx
0ca5b5ae35 Fixed potential crash with _NET_SetKey_f_CompletionFunc. 2021-12-26 02:37:56 +01:00
IcePixelx
c81aca28de Fixed a few asserts regarding the gui. RPak things. Check description.
* Fixed assert on ImGui on IBrowser because ImGui::Begin wasn't followed up by ImGui::End
* FileExists got modernized. Using std library instead of Windows native functions now.
* RTech::DecompressedSize is actually readable now thanks to steyk.
* Same goes for RTech::Decompress
* rtech_decompress prints the decompressed file CRC32 now and writes the file all at once.
* Fixed ImGui assert on spamming SetupImGui();
2021-12-26 02:30:20 +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