606 Commits

Author SHA1 Message Date
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
Kawe Mazidjatari
f2223d8bd7 Fix CNetChan structure for anything lower than S3 2022-04-02 04:11:44 +02:00
Kawe Mazidjatari
f7b9754a43 Fix small compiler error 2022-04-02 02:56:59 +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
b85683b6f7 Prevent dedicated server from writing any files to 'Saved Games' folder 2022-03-31 23:54:45 +02:00
Kawe Mazidjatari
a6b92f8713 Strip server vm reference from client dll 2022-03-31 17:23:14 +02:00
Kawe Mazidjatari
83fc611a48 Prevent dedicated server from overwriting videoconfig file 2022-03-31 17:22:46 +02:00
Kawe Mazidjatari
66146f6590 Adapt majority of SQVM to SQ types 2022-03-31 02:26:05 +02:00
Kawe Mazidjatari
42ef6ef228 Hook sq_pushroottable as well 2022-03-31 00:10:18 +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
ecb2bc54ad More SQ types and 'sq_compilebuffer()' AOB + prototype
Added signature and prototype for 'sq_compilebuffer()'.
Added 'SQBufState' structure to sqtypes.
Adapt entirely to SQ types for all sqapi functions.
2022-03-30 00:06:52 +02:00
Kawe Mazidjatari
28b1718cb1 Add Squirrel typedefs 2022-03-29 22:27:56 +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
PixieCore
433a3b27a2 Changed CBaseClient::Clear to void type. 2022-03-28 14:22:27 +02:00
Kawe Mazidjatari
bccd936040 Add 'SQVM_CreateServerVM()', 'g_pServerVM', and 'SQVM_CreateClientVM()', g_pClientVM
TODO: Get and hook DestroyVM
2022-03-28 12:09:40 +02:00
Kawe Mazidjatari
e755961d77 Modernize ECommandTarget_t enum 2022-03-28 12:03:07 +02:00
Kawe Mazidjatari
a875cd490c Default CNetAdr2::GetIP() 'bBaseOnly' to false 2022-03-28 12:02:40 +02:00
Kawe Mazidjatari
73cdaf18e3 Slight cleanup 2022-03-28 12:02:11 +02:00
Kawe Mazidjatari
9953caab7d Declare 'hsq_pushconstant()' 2022-03-28 02:25:04 +02:00
Kawe Mazidjatari
02eb25a268 Create 'sq_pushconstant()' hook 2022-03-28 02:19:54 +02:00
PixieCore
5939c00fe1 Avoid potential crash for unloading rpaks. 2022-03-28 00:59:39 +02:00
PixieCore
2045f52ad8 Unloading rpaks poperly now that we load on map load. 2022-03-28 00:57:04 +02:00
Kawe Mazidjatari
89a8909cbb Fix dedicated compile error 2022-03-27 23:52:54 +02:00
PixieCore
d930cb66e0 Migrated CClient to CBaseClient. 2022-03-27 23:50:35 +02:00
Kawe Mazidjatari
b405125357 Fix clang-cl compile
Temporarily commented SDL2 audio as some SSE code doesn't work properly with clang-cl
2022-03-27 22:18:58 +02:00
Kawe Mazidjatari
b1a806dccb Rename 'GAMECLIENTONLY' definition to 'CLIENT_DLL' 2022-03-27 22:17:30 +02:00
Kawe Mazidjatari
b76a86d18d Default 'sv_pylonvisibility' to 0 2022-03-27 21:13:59 +02:00
PixieCore
404ef9255c New fields for CBaseClient, fixed CBaseServer functions. 2022-03-27 19:35:33 +02:00