217 Commits

Author SHA1 Message Date
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
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
Kawe Mazidjatari
452c8afcf3 Display '%' symbol properly in console 2022-05-10 23:32:44 +02:00
Kawe Mazidjatari
9ceffb2491 Fix forgotten color parameter 2022-05-10 18:09:49 +02:00
Amos
473db0e320 Finish game console optimizations
The console no longer should cause huge frame drops when the vector size increases around its max size
2022-05-10 13:26:03 +02:00
Kawe Mazidjatari
46134434a9 Show script error callstacks and context in colors in the external console
Show colors on console and use color constant to determine color instead of comparing strings in the console render loop. removed 5 string compares which should once again bump the performance quite a bit. The last string compares will be removed soon
2022-05-09 21:21:05 +02:00
Kawe Mazidjatari
611ea6447a Console performance improvements and bug fixes
* Heavily reduced string compares for coloring logs (the left overs require a dedicated hook, this is for the future)
The new method uses a ImVec 4 constant containing the color obtained via a switch case by context, this is then out into the new CConLog structure where the loop in the console will now gather the colors directly from.
Error/Warning use a single constant.

* Fixed bugs in several log locations where the ostringstream was cleared before the emission causing double logs.

* Added global log mutex to log wrappers that lacked those.
2022-05-09 02:20:07 +02:00
Kawe Mazidjatari
636c9b595e Update IBrowser.cpp 2022-05-08 16:28:20 +02:00
Kawe Mazidjatari
5898ba14e0 Cleanup server browser 2022-05-08 16:20:48 +02:00
PixieCore
66d122e192 Start of CEngineClient implementation.
* Rebuild SetRestrictedServerCommand and SetRestrictedClientCommands
* Implemented new CMemory Function to walk through a VTable.
* pDetours->GetCon() gets called first now.
*
2022-05-06 00:34:46 +02:00
Kawe Mazidjatari
93f634022a Get all available maps from VPK instead
Before we used the stbsp's, but we don't need to copy these for each maps (we could load existing ones to get working texture streaming for maps that don't have this)
2022-05-04 17:36:23 +02:00
Kawe Mazidjatari
ad08685e9b Remove hardcoded map names
We are not hardcoding them
2022-05-04 12:55:00 +02:00
Kawe Mazidjatari
6ff10228ee Fix incorrect color code
Added FCVAR_DEVELOPMENTONLY | FCVAR_HIDDEN and fixed FCVAR_DEVELOPMENTONLY | FCVAR_CLIENTDLL
2022-04-26 20:35:51 +02:00
Kawe Mazidjatari
c0511fa8e4 See description
* Add ConVar to allow user to set/unset FCVAR_DEVELOPMENTONLY ConVar's (default behavior would never be hit without this ConVar).
* Add icons to display the flags of a certain CommandBase.
* Fixed Dear ImGui not displaying images correctly (descriptor needs DXGI_FORMAT_R8G8B8A8_UNORM_SRGB due to the nature of this game).
* Dynamically obtain buffer sizes of resources taken from modules.
* Light SDK cleanup.
2022-04-26 20:24:51 +02:00
Kawe Mazidjatari
1e7b746356 More detailed system stats
Fixed physical core count always returning logical core count (this engine does not run on the AMD Phenom processor).
2022-04-18 16:45:26 +02:00
Kawe Mazidjatari
ecfc380f84 Sort IConsole autocomplete list lexicographically
QoL update for the console.
2022-04-18 05:34:21 +02:00
Kawe Mazidjatari
f2a5c8ac68 See description
* Renamed 'r5apexsdkd64.dll' to 'gamesdk.dll'.
* Added required dedicated parameters to code instead.
* Bug fixes around CCommandLine class (fixed misaligned VTable indexes).
* SDK now supports being directly launched by the game executable.

The SDK launcher will pass '-launcher' to the game, which indicated its being launched by the launcher. If the game does not receive '-launcher', it assumes its being launched directly from the game executable, which will instead load 'startup_(dedi_)default.cfg'.

The sdk dll's are now added to the game's IAT by their dummy exports allowing for them to be loaded when the exe is loaded (the dll's do everything on init).
2022-04-16 00:30:46 +02:00
Kawe Mazidjatari
b753295a49 SDK improvements
* Dedicated SDK now supports ASLR enabled executables.
* Complete removal of CEngineClient on the dedicated server.
* Complete removal of gHLClient and g_pHLClient on the dedicated server.
* Performance improvements for the dedicated server frame loop.
* ConVar 'CVCallback_t' structure rebuild.
* Reduced overhead throughout SDK.
2022-04-14 19:18:59 +02:00
Kawe Mazidjatari
2dcbf59041 Move ConVar/ConCommand stuff to tier1 instead and cleanup KeyValues/KeyValuesSystem 2022-04-09 16:16:40 +02:00
Kawe Mazidjatari
c431434680 Fix 'Reload Scripts' button in Server Browser 2022-04-08 23:03:09 +02:00
Kawe Mazidjatari
5d69d7284e Slight project cleanup 2022-04-02 12:27:35 +02:00
Kawe Mazidjatari
6feb41c285 Partial CNetChan class rebuild and implementation (see description)
* Adapt codebase to new class to reduce rune-like code.
* Fixed several bugs where the global CClient pointer was used instead of the instance in question to issue bans and display information about a certain client in CBanSystem and Pylon.
* Upgraded CBanSystem and Pylon to use IPv6 instead (including IPv4 mapped IPv6 addresses). This breaks all existing banlist files! All bans have to be re-issued or the existing file has to be updated to use IPv4 mapped IPv6 addresses and renamed to 'banlist.json', and moved to the root of the 'platform' folder.
2022-04-02 02:48:54 +02:00
Kawe Mazidjatari
b1a806dccb Rename 'GAMECLIENTONLY' definition to 'CLIENT_DLL' 2022-03-27 22:17:30 +02:00
Kawe Mazidjatari
4cbb4746bd Fix Pylon backend not working on dedicated server
Also fix dual thread for backend, and main thread pausing when request is slow
2022-03-26 18:06:54 +01:00
Kawe Mazidjatari
687446eade Cleanup CConsole 2022-03-25 13:31:31 +01:00
Kawe Mazidjatari
96bf41655a Use CBuf_AddText() and Cbuf_Execute() instead
Small improvement
2022-03-25 13:17:57 +01:00
Kawe Mazidjatari
bc3d42d0be Add client build only to SDK (client.dll)
For future S4 debugging
2022-03-23 23:05:43 +01:00
Amos
1058a6fa10 Use unicode character set instead and light cleanup/bug fixes 2022-03-04 12:22:17 +01:00
Amos
3616b85f6a Some fixes and new features, see description.
* Add CServerGameDLL interface to SDK (unfinished)
* Inline all CHostState members. Calling discrete member functions will result in a corrupt stack. It also alters with the VTable layout in the engine since we assign our SDK instance directly to it. Forcing everything to be inline (like the assembled counterpart within the executable itself) will ensure no virtual calls will get created and misalign the base VTable.
* Patch SQVM_CompileError to call SQVM_Error with the severity flag set to false (0 = do not terminate process, 1 is terminate process).
2022-02-24 01:51:11 +01:00
Amos
d3c7b9baf5 Rename to make more sense 2022-02-23 21:11:35 +01:00
Amos
cfa572f20e Small fixes + improve console autocomplete readability 2022-02-23 21:02:37 +01:00
Amos
9506a5141a CConsole improvements
* Pad the autocomplete list with 18 to keep all items in view
* Show help text for ConCommand as well
+ Small code cleanup
2022-02-23 15:56:03 +01:00
Amos
c6cf40f539 Optimize console autocomplete and show usage text 2022-02-22 16:31:24 +01:00
Amos
ae0b439a3c Additional cleanup + optimizations 2022-02-21 12:06:05 +01:00
Amos
15897c0ea1 Small logging improvement 2022-02-16 01:53:31 +01:00
Amos
6e3fb73a82 Update comment blocks 2022-02-14 02:31:42 +01:00
Amos
a5b3b2dea4 Update comment blocks 2022-02-13 15:16:09 +01:00
Amos
d3d1e673ae Fix IConsole assertions 2022-02-06 16:33:11 +01:00
Amos
2e8cc3e7b1 Update ImGui default theme 2022-01-28 12:56:51 +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
3be02f949b Add remote function calls checksum for server 2022-01-20 16:04:10 +01:00
IcePixelx
140a3476f9 fixed empty control statement. 2022-01-20 14:18:19 +01:00
Amos
963c189f35 Reset scroll position when AutoSuggest has updated 2022-01-20 00:24:41 +01:00
Amos
b1d3a01a71 Reset AutoComplete vars when "Submit" button is clicked 2022-01-19 23:12:43 +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
c796a44aa9 Keep items within rect
The text was off by one unit after the last commit
2022-01-18 11:37:53 +01:00
Amos
6bc6996f9a Fixed scroll position bug out of scope + changed autocomplete scrolling behavior to that of Source console
Added new parameter for forcing default ImGui theme
2022-01-18 11:24:03 +01:00
Amos
60f3402fd6 Improve readability of AutoComplete suggestion ConVar values 2022-01-18 02:21:46 +01:00