106 Commits

Author SHA1 Message Date
Kawe Mazidjatari
e2f06a8a68 Massive performance improvements
Inline every signature defined in the SDK (previously each translation unit had its own copy of the signature and function prototype). DLL init is near instant now (85% speed improvements).
2022-04-09 02:18:57 +02:00
Kawe Mazidjatari
aa57170e0d Start of pattern search refactor 2022-04-09 01:14:22 +02:00
Kawe Mazidjatari
6a46486e99 See description
* Added 2 new FileSystem pointers with new features in their classes.
* Register all factory instances created by the GameDLL in the SDK.
* Added new command 'fs_mount_vpk' to mount a specified VPK file.
* Renamed 'fs_decompress_pak' to 'fs_unpack_vpk'.
* Some renaming of Factory and VPK types.
* Some light optimizations/cleanup.
2022-04-09 00:59:42 +02:00
Kawe Mazidjatari
36a9c2779b Fix debug dll assertions
+ cleanup/optimizations
2022-04-06 00:49:17 +02:00
Amos
b336b37025 Update fasttimer.h 2022-04-05 11:41:26 +02:00
Amos
7724e06d3f FastTimer cleanup 2022-04-05 11:33:37 +02:00
Kawe Mazidjatari
f4b263b412 Cleanup 2022-04-05 01:13:27 +02:00
Kawe Mazidjatari
7258a35ff5 Add AI Network methods and add hook for AIN connection debug 2022-04-03 03:10:48 +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
7c9a50f0d5 Add proper license to project
The project was never licensed, it only contained third party licenses.
I determined to use the Source SDK 2013 license for this, as the majority of the business logic running this product is based on Valve's (the license has zero restrictions in the scope of our goal with this project).
The licenses has to be included with any depots from now on in the folder 'legal' placed in the root of the project folder (the location of r5apex_ds.exe).

With any new additions of third party code, the 'thirdpartylegalnotices.txt' file has to be updated accordingly.
2022-04-01 00:11:42 +02:00
Kawe Mazidjatari
66146f6590 Adapt majority of SQVM to SQ types 2022-03-31 02:26:05 +02:00
Kawe Mazidjatari
79f99970c6 Implemented SERVER, CLIENT and UI script commands
User can now execute script on the SERVER, CLIENT and UI vm's through the SDK
2022-03-30 22:54:33 +02:00
Kawe Mazidjatari
446f13680f Improve SQVM function registration and add SERVER and CLIENT logic
SERVER and CLIENT functions can now be registered as well.
For checking whether to register for CLIENT or UI, we now check its context instead of comparing pointers. For server, a dedicated function was build.
2022-03-28 19:34:51 +02:00
PixieCore
56a71aba56 A few RTech changes.
* Renamed pak_asyncload to pak_requestload
* Added new ConCommand to unload rpaks. It's called pak_requestunload.
* When CHostState requests an rpak unload, it will now print the name of it.
* Turned a few static addresses onto patternscans.
2022-03-28 18:47:11 +02:00
Kawe Mazidjatari
e755961d77 Modernize ECommandTarget_t enum 2022-03-28 12:03:07 +02:00
PixieCore
d930cb66e0 Migrated CClient to CBaseClient. 2022-03-27 23:50:35 +02:00
Kawe Mazidjatari
0c766266f1 Fix compile error 2022-03-27 14:07:22 +02:00
Kawe Mazidjatari
4a5823023d Add CHostState::Think ConVar's and new method to return double value 2022-03-27 11:42:24 +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
2faf92ee17 Fix small oversight 2022-03-26 00:42:09 +01:00
Kawe Mazidjatari
1038ba786e CBaseClient overhaul and partial class rebuild
Also added initial CBaseServer rebuild
TODO: INetChannel rebuild..
2022-03-26 00:24:13 +01:00
Kawe Mazidjatari
96bf41655a Use CBuf_AddText() and Cbuf_Execute() instead
Small improvement
2022-03-25 13:17:57 +01:00
Kawe Mazidjatari
eccddb3883 Reorder FastTimer class 2022-03-25 02:25:50 +01:00
PixieCore
f62c4c1284 Merge branch 'indev' of https://github.com/Mauler125/r5sdk into indev 2022-03-24 00:07:51 +01:00
PixieCore
a1cd5cf9f3 Reminder for myself to pattern scan, pak_listpaks vars. 2022-03-24 00:07:44 +01:00
Kawe Mazidjatari
7628ae6ff9 Rename pak asyncload and decompress commands 2022-03-24 00:05:19 +01:00
PixieCore
ef5abb16ea Added the ability to disable rUI drawing. By @r-ex. 2022-03-23 23:28:12 +01:00
PixieCore
7b5676210b Added new ConCommand to list all loaded rpaks. By @r-ex 2022-03-23 20:31:29 +01:00
Kawe Mazidjatari
328fc61b27 Fix MSVC compiler errors 2022-03-23 19:23:53 +01:00
Kawe Mazidjatari
3110bbfb78 Calculate CRC for AIN (for later)
Add CRC calculated from large NavMesh (used to build AIN..)  for later.
The future check will compare AIN CRC and NavMesh CRC and warn if they don't match (recommend a update, and auto run update if cvar set).

Also added better profiling to SaveNetworkGraph code
2022-03-22 01:59:02 +01:00
Kawe Mazidjatari
4bb3be2a8e Implement CPU utils and FastTimer
CPU system utilities and FastTimer (inline)
2022-03-21 23:13:03 +01:00
PixieCore
4330b8064b Fixed "mat_crosshair" callback.
Not registering a new command anymore. Instead we fix mat_crosshair.
2022-03-18 22:45:12 +01:00
PixieCore
8a672f4dfc CMaterialGlue changes.
Discovered new potential names for class vars.
2022-03-18 21:38:57 +01:00
PixieCore
96ee0a834d Added DXTexture fields to CMaterialGlue 2022-03-18 20:13:28 +01:00
PixieCore
0c9e184e3f GetMaterialAtCrossHair changes, CMaterialGlue changes.
CShaderGlue still needs to be reverse engineered.
CMaterialGlue still needs verification for S0-S2 to see if the struct matches.

Patterscanning GetMaterialAtCrossHair now.
2022-03-18 18:34:27 +01:00
PixieCore
627b25c120 Initial implementation of CMaterialGlue.
Some GUID's are still unknown.

Class members need verification like the material resolution member.

Added a ConCommand for getting the material we are currently looking it and printing it to the console.

Porting to other seasons still need to be done.
2022-03-18 13:47:22 +01:00
Kawe Mazidjatari
35ad8554a5 Somewhat correct working navmesh
The reachability table needs to be figured out still. The issue should be very small, but at the moment I do not have time for it.

The pointer to the table, and table pointers to data is correct, however, not a single poly is ever getting marked as 'reachable' (0xffffffff). This could be either within recast itself (see build_link_table() and set_reachable() functions), or the way the engine parses the data. The function that determines whether poly is reachable is located at '0x140F448E0'
2022-03-18 03:14:07 +01:00
Amos
24cd3aa2d5 Small improvements 2022-03-12 13:19:31 +01:00
Amos
ff06cb71eb Fix build for S1 2022-03-07 11:36:45 +01:00
Amos
2fee28ae96 Adapt to new loggers 2022-03-04 15:59:33 +01:00
Amos
1058a6fa10 Use unicode character set instead and light cleanup/bug fixes 2022-03-04 12:22:17 +01:00
Amos
4a0772bd18 Cleanup completion functions
Use actual CCommand class instead of offsets to members + reduced comments of self explanatory function names now that we use the class instead.
2022-03-02 02:03:46 +01:00
Amos
2719a85504 Debug overlay QOL improvements + Con_NPrintf() hook
* Added ability to invert rect to calculate offsets from bottom/right as well so debug text doesn't get out of view, or obstruct view when window is resized.
* Added Con_NPrintf() hook which shows detailed systems running times and VGUI panel debug information.
2022-02-28 01:01:40 +01:00
Amos
62604e8fe9 CAI related stuff (see description)
* Partially rebuild CGlobalVarsBase and CGlobalVars struct.
* Partially implement BuildAINFile (disk builder) written by BobTheBob9. All that needs to be found are the addresses/offsets for 'pUnkStruct0Count' and 'pUnkLinkStruct1Count' (see ai_node.h). I didn't have time for it yet.
* Patch call which restarts the engine once AIN file has been build (so it doesn't get cleared from memory).
* Temporarily patch write operation in 'Detours_LevelInit()' which writes out of scope since the navmesh structure is misaligned somewhere still with a few bytes.

NOTE: 'CAI_NetworkBuilder::BuildFile()' is for now commented out until the 2 other structs are found in the game dll. Once found then we could start fixing the struct offsets and hope it works as-is.
2022-02-27 03:15:00 +01:00
Amos
23f37bfa50 RCON QOL improvements 2022-02-24 16:44:33 +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
0c069db90c Fix ConCommand size 2022-02-23 03:41:10 +01:00
Amos
9e66ed7f2e Fix warning 2022-02-23 00:21:54 +01:00