685 Commits

Author SHA1 Message Date
Kawe Mazidjatari
84fe122e43 Update ImGui lib
Update to 1.87
2022-04-24 20:52:40 +02:00
Kawe Mazidjatari
3a46bff5ee Don't update material system configs on the dedicated server 2022-04-24 19:34:14 +02:00
Kawe Mazidjatari
82261f6c56 Small improvements 2022-04-24 19:32:47 +02:00
Kawe Mazidjatari
31b95f41e8 Don't initialize SDL when running naveditor from the commandline
+ some additional cleanup.
TODO: get logging working on command line
2022-04-22 02:33:26 +02:00
Kawe Mazidjatari
a778d910e7 Fix rare crash in naveditor
Running tests in the naveditor without building navigation segfaults the application.

Reduced verbose prints when building navigation.
2022-04-22 02:31:06 +02:00
Kawe Mazidjatari
3ad668e37a Fix script command
Fixed problem where in certain cases input doesn't get compiled at all.
Fixed problem where quote marks don't get passed correctly to the execute wrapper function.

problems:
passing non-string object as reference to constructor.
using CCommand::Arg(index) seems to 'strip' quote marks from the actual buffer.
2022-04-22 02:27:35 +02:00
Kawe Mazidjatari
02cbb36474 Improved script commands
Quotes are no longer needed
2022-04-19 22:47:58 +02:00
Kawe Mazidjatari
b421a17d2b Dedicated server optimizations
Removed all ui.rpak/ui.dll assets loading on the dedicated server.
Moved AsyncLoad to CPakFile class.
Moved g_pMallocPool to tslist.h.
2022-04-19 03:55:20 +02:00
Kawe Mazidjatari
3d32346b39 Fix patterns for S1 and removed redundant code 2022-04-19 00:00:45 +02:00
Kawe Mazidjatari
642d852e69 Fix pattern mismatch for S2 2022-04-18 22:25:03 +02:00
Kawe Mazidjatari
987fc6f78e Update casts 2022-04-18 20:15:23 +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
8ebdf6fa65 Add performance metrics and supplemental CPU details on startup 2022-04-18 03:46:26 +02:00
Kawe Mazidjatari
5c2c5709e5 Update gl_screen.cpp 2022-04-18 03:35:24 +02:00
Kawe Mazidjatari
e32cc6ae6a Code overhaul
Moved every pattern to IDetour interface. This allows for debugging patterns scans more easily, and create threads during pattern searching (Operation is now fired in APIENTRY).

Also cleaned up some unused code/extraneous comments.
Slightly increased performance by purging duplicate patterns.
Made variable search less dependent from other results (except if pattern-to-scan results is within the same header)
2022-04-18 03:35:08 +02:00
Kawe Mazidjatari
7d869ca189 Extra dedicated server optimizations 2022-04-17 02:00:06 +02:00
Kawe Mazidjatari
73a3748e7c Dedicated optimizations
Strip 'CWin32Surface::InitStaticData()' and 'KeyboardLayout_Init()' from dedicated
2022-04-16 23:53:03 +02:00
Kawe Mazidjatari
e1a76e3e28 Fix small formatting mistake 2022-04-16 23:51:37 +02:00
Kawe Mazidjatari
601799430c Remove extraneous '/arch:AVX2' compiler flag
The game doesn't require a CPU with AVX2 instructions, our SDK did because of a mistake (I left this compiler flag in after debugging the SDK, and never removed it).

Bit shift operations use the SHLX instructions instead of the widely supported SHL instructions when this flag is issued.
2022-04-16 23:50:57 +02:00
PixieCore
2b2b6c8139 Merge branch 'indev' of https://github.com/Mauler125/r5sdk into indev 2022-04-16 13:02:19 +02:00
PixieCore
6e907c8f99 Changed docs on interfaces.cpp 2022-04-16 13:02:14 +02:00
Kawe Mazidjatari
d4aa300942 Update launcher.cpp
Small mistake
2022-04-16 12:51:28 +02:00
Kawe Mazidjatari
5f0d45486e Update config files 2022-04-16 00:42:48 +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
cfe920f971 Update playlist file 2022-04-15 23:57:58 +02:00
Kawe Mazidjatari
0bcc3036dd NOP 'avi->Init()' from dedicated.
AVIFIL32.dll is no longer required to run the dedicated server
2022-04-15 20:06:27 +02:00
Kawe Mazidjatari
196db8660e Dedicated and SDK improvements
* Improve ConVar class (fixed several bugs).
* Hook CEngineAPI::ModInit() and set m_bRestrictServerCommands from there.
* Disable unused ConVar's and purge unused ConCommands in CEngineAPI::ModInit() for dedicated.
* Small relocation of malloc related signatures.
2022-04-15 04:02:33 +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
64f5935ba6 Light optimization v2.0.6_rc2 v2.0.6_rc1 v2.0.5_rc5 v2.0.5_rc4 v2.0.5_rc3 v2.0.5_rc2 v2.0.5_rc1 v2.0.4_rc4 v2.0.4_rc3 2022-04-13 01:37:49 +02:00
Kawe Mazidjatari
7ba4f4021b Remove last hardcoded addresses for GameSDK 2022-04-13 01:25:33 +02:00
Kawe Mazidjatari
e1f5e7d46b Un-hardcode all CHostState dependencies
The SDK now works on executables with ASLR enabled.
!TODO: Dedicated.
2022-04-12 02:48:46 +02:00
Kawe Mazidjatari
db141d5edb Small mistake 2022-04-11 01:51:50 +02:00
Kawe Mazidjatari
092b7e9d43 Start of migration to IDetour interface
Migrating to this to initialize all patterns and prototypes in Systems_Init() instead.
This should make debugging missing/not found patterns easier and allow for opting out variable/constant search (some of these require other patterns to be found, thus resulting in seg faults..).

Also added check to detect if user has a eligible CPU to run this SDK.
The game requires SSE and SSE2 instruction sets. Our SDK requires this too due to the use of SSE intrinsics, so we cannot let the game handle this. We have to check it ourselves.
2022-04-11 01:44:30 +02:00
Kawe Mazidjatari
8c1dfb50f4 Address class cleanup/improvements
* Move most definitions to implementation file to avoid recompiling whole program for small changes
* Pass strings by reference for where possible.
* Split Module class to dedicated file.
* Add const qualifiers to all eligible methods for address/module class
* Some renaming
2022-04-10 19:59:34 +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
b3631facbe Update all function casts 2022-04-09 06:05:47 +02:00
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
c431434680 Fix 'Reload Scripts' button in Server Browser 2022-04-08 23:03:09 +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
60cd5a000a Un-hardcode ban message 2022-04-05 00:55:59 +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
a4b4bb6ef5 Update playlist to accommodate 'GetPromoData' localization changes 2022-04-02 13:12:34 +02:00
Kawe Mazidjatari
b4485f1d23 Add extra SQVM features
Added 'GetNumHumanPlayers' and 'GetNumFakeClients' to SERVER vm
Changed hardcoded strings in UI 'GetPromoData' to localization keys

TODO: add localization files to SDK
2022-04-02 13:03:11 +02:00
Kawe Mazidjatari
5d69d7284e Slight project cleanup 2022-04-02 12:27:35 +02:00