108 Commits

Author SHA1 Message Date
Kawe Mazidjatari
25e2581f2b Implement fully mapped out ConCommandBase VFTable interface class 2022-07-25 20:06:06 +02:00
Kawe Mazidjatari
19d264ec11 Implement RCON_PasswordChanged_f and ConVar improvements
* Changing RCON passwords on the server now closes all connections and re-initializes the system.
* Fully mapped out VFTable interface for IConVar* (used for ConVar callbacks, see callback.cpp).
2022-07-25 19:35:08 +02:00
Kawe Mazidjatari
2db57b15fc Slightly mapped out IClientEntity
Most unknown but GetAbsOrigin and GetAbsAngles do work properly.
2022-07-24 15:29:02 +02:00
PixieCore
c348b41934 Merge branch 'indev' of https://github.com/Mauler125/r5sdk into indev 2022-07-24 15:09:51 +02:00
PixieCore
ef28df4aa1 CModule::GetVirtualMethodTable optimization 2022-07-24 15:09:45 +02:00
Kawe Mazidjatari
f314b9b4e7 Start of C_Player reversing 2022-07-24 12:59:40 +02:00
PixieCore
da800c1ad3 Should be 8 Masks not 4. 2022-07-20 18:15:54 +02:00
PixieCore
22bb1d4cde Implemented CModule::GetVirtualMethodTable.
* Added CModule::GetVirtualMethodTable. Gets you a pointer to a VTable by its rtti type descriptor name.
* Added StringToMaskedBytes. Turns a string into masked bytes.
* CModule::FindPatternSIMD now allows you to custom define a section it should search in.
2022-07-20 18:03:35 +02:00
PixieCore
f57da25341 RTech changes.
* Added RPakAssetBinding_t.
* Added RPakUnknownStruct_t
* PatternScan the global RPakUnknownStruct_t.
* Renamed Members of CMaterialGlue
* RTechTextureInfo_t now has another unknown member named.
2022-07-20 11:27:42 +02:00
PixieCore
a8b74ec93a memaddr and module const cleanup. 2022-07-15 19:43:29 +02:00
Kawe Mazidjatari
bd3fe5b445 Public IVDebugOverlay VFTable interface.
New public interface to add debug overlays on the go (memory is managed by the game module).
3 new commands:
* line.
* sphere.
* capsule.
2022-07-12 17:46:47 +02:00
PixieCore
0463647268 Do proper checks if Client Instance is valid 2022-07-07 20:35:49 +02:00
Kawe Mazidjatari
7d89a42b56 Mathlib implementation
SourceSDK mathlib port with light modifications.
Renamed Vector to Vector3D (to avoid confusion with std::vector (declared as vector) and Vector2D/Vector4D).
2022-07-06 21:11:32 +02:00
PixieCore
540b282998 Remove redundant function. 2022-07-03 13:05:14 +02:00
PixieCore
f614ed5140 New CMemory function and vgui comments.
* CMemory::FindAllCallReferences: Get all function calls to a function from the supplied sectioBase and sectionSize, useful to mass patch calls to a function.
2022-07-02 19:08:35 +02:00
PixieCore
7eb6952df0 Use const in memaddr.cpp where its supposed to be. 2022-06-29 16:32:40 +02:00
Kawe Mazidjatari
3323c3fadb Small ImGui theme adjustments 2022-06-27 14:48:03 +02:00
Kawe Mazidjatari
374a44f29e Rename PatternToBytesAndMask to PatternToMaskedBytes 2022-06-26 17:45:54 +02:00
PixieCore
8867b3bd7b Even faster startup now. 2022-06-25 12:05:09 +02:00
PixieCore
232680a2a6 CMemory::FindPattern cache bytes in L1.
* Pre-fetch bytes and cache them in L1.
2022-06-25 11:58:30 +02:00
PixieCore
64cf0d33d7 Fixed convention naming in PatternToBytesAndMask. 2022-06-25 00:10:36 +02:00
PixieCore
5ecac66dba Overloaded FindPatternSIMD that only takes 1 string.
* Uses IDA Style Pattern, Byte Array and Mask get created from that pattern.
2022-06-25 00:08:02 +02:00
PixieCore
39de0c3687 memaddr adjustments. 2022-06-24 23:32:47 +02:00
Kawe Mazidjatari
fbcee16f97 CAI_NetworkBuilder::SaveNetworkGraph improvements
Use CIOStream class.
Use proper type for CAI_Network::m_iNumNodes.
Improved CIOStream to take std::filesystem::path instead of std::string.
2022-06-24 16:56:28 +02:00
Kawe Mazidjatari
e22c17340f Add 'UTF8CharLength(..)' to utility.cpp 2022-06-24 12:12:30 +02:00
Kawe Mazidjatari
479adc4b85 CCommandLine additions 2022-06-24 12:10:46 +02:00
Kawe Mazidjatari
1b6f40d941 Fix for SVC_UserMessage
Removed padding that was causing the structure to misalign with the game's one.
Enabled 'SVC_UserMessage::Process()' hook (function works properly after the structure alignment).
2022-06-23 18:20:17 +02:00
Kawe Mazidjatari
ff59db1b95 Light improvements
Update comments.
Proper type for 'user_creds::m_nUserID'.
Proper type for 'CClient::SetUserID'.
Added 'CClient::SetHandle'.
2022-06-14 21:53:03 +02:00
Kawe Mazidjatari
ebf4921063 Ban system improvements
NucleusID/OriginID is an unsigned type, changed all types to uint64_t and cleaned up redundant code.
2022-06-14 20:56:55 +02:00
Kawe Mazidjatari
9fd39d4e21 CModule class optimizations
Module segments are now part of the class to eliminate unnecessary re-inits and copies.
2022-06-13 23:34:06 +02:00
Kawe Mazidjatari
7c0c541405 FileExist cleanup
Use fs::path constructor for all strings.
Renamed CPakFile::AsyncLoad to CPakFile::LoadAsync.
Renamed CPakFile::Load to CPakFile::LoadPak.
2022-06-12 12:40:26 +02:00
Kawe Mazidjatari
872b39514f Add file extension support to .vpkignore 2022-06-07 13:46:18 +02:00
Kawe Mazidjatari
b62cf7c017 Add support for .vpkignore file
Folders can be globally excluded using the '.vpkignore' file (placed in the workspace root).
To exclude specific files, use the manifest file.
2022-06-06 23:08:53 +02:00
Kawe Mazidjatari
d005626aa0 Fix VPK root files bug
Files names of files located in the root of a VPK weren't formatted properly
2022-06-05 18:01:23 +02:00
Kawe Mazidjatari
92daef5a32 VPK system improvements
More detailed operation statistics.
Discard VPK directory files who's header doesn't match engine requirements.
Separated manifest properly between language and context (you can now package for each language and context from a single workspace).
2022-06-05 17:28:39 +02:00
Kawe Mazidjatari
fb0a3db69e Fix spelling V2.0 2022-06-05 02:44:55 +02:00
Kawe Mazidjatari
ad0f94e973 Implement data sharing algorithm in VPK packing
This reduces size of the resulting VPK (checks entry block in hash map).
mp_common compresses to 32mb instead of 37.3mb (original is 38.5mb).
2022-06-04 13:55:24 +02:00
Kawe Mazidjatari
6e32775c71 Additional VPK system improvements
Added DevMsg logs to show the elapsed time of the operation.
Fixed post decompress CRC/ADLER error checking.
Slight cleanup.
2022-06-04 03:12:46 +02:00
Kawe Mazidjatari
655d1c65b2 Proper VPK repacking
Initial proper implementation pending cleanup.

The new system builds a manifest file when a VPK is unpacked. The manifest files contains data such as the entry flags and texture flags. It also contains a field determining whether the file should be compressed or not.

When a user repacks a pack, the system attempts to load this manifest file and does a lookup to the object to retrieve the flags (most of these flags are unknown, but they are used by the engine and are necessary for stuff like cubemaps and texture files to work correctly. Cubemaps won't work with proper flags, and textures (decals, particle system components, etc..) will look washed out without them.

I think some also determine whether a file within the VPK should be cached or not, so simply marking everything as 0x101 will probably end up in more CPU time and higher filesystem cache usage (depot/ is only 0x1, I don't think anything there is getting cached ever without the 0x100 flag).

User could also repack a VPK while excluding anything that is not in the manifest file. So you could unpack all VPK's into a single directory (each VPK has its own manifest file tied to its level name), and rebuild all the VPK's with only the files that where originally in them.

fs_pack_vpk command usage: <locale> <context> <level_name> <manifest_only>

locale determines the pak language (default english), context determines whether is a server/client vpk, level_name determines the BSP name of the pak, manifest_only determines whether the pack system should only include files within the manifest (leaving this arg out will build all files into the vpk).

The VPK workspace path is determined with ConVar 'fs_packedstore_workspace'.
2022-06-04 01:08:23 +02:00
Kawe Mazidjatari
b65928b0c7 Improve spelling 2022-06-03 19:38:58 +02:00
PixieCore
3b46780a38 Temp fix so I can compile (UTF8Decode) 2022-06-02 16:30:35 +02:00
Amos
07533cb0c4 packedstore cleanup
Add const qualifiers to params.
Enable compression flags.
2022-06-02 15:20:22 +02:00
Kawe Mazidjatari
e6e4bd703c Fix string utility bugs
GetFileName returned null string if file is not within a path, now returns the input file name.
RemoveFileName returned file name if file is not within a path, now returns null string.
Added StringReplaceC (string replace with copy instead of modifying the reference object).
2022-06-02 01:55:41 +02:00
Kawe Mazidjatari
4d8d164df6 Improve CIOStream class
Add read/write with specified size.
Add data vector.
2022-06-02 01:52:49 +02:00
Kawe Mazidjatari
5b75903ac2 Fixed missed rename of 'Read()' 2022-05-30 02:47:55 +02:00
Kawe Mazidjatari
2ee9cce393 Improve binary stream class 2022-05-30 02:47:15 +02:00
Kawe Mazidjatari
399131d57d Add additional useful string utils 2022-05-30 01:50:21 +02:00
Kawe Mazidjatari
11652d015d SDK launcher progress
* Fixed compiler error when trying to compile SDK Launcher in debug (static lib was not compiled with static link runtime).
* Documented most stuff in basepanel.cpp
* Split some logic into dedicated functions in basepanel.cpp
* Implemented VDF parser from Matthias Moeller.
* Parse playlist file and load all playlists into the combo box.
2022-05-26 01:44:46 +02:00
Kawe Mazidjatari
4b72afb74f Light refactor for logging
Moved logging functions to dbg.h (tier0) and export them from the dll.
Added additional functions for checking bad pointers (debug only!).
Reduced output code size.
2022-05-25 14:18:29 +02:00
Kawe Mazidjatari
dacd307663 See description
* Finished designer code for launcher gui.
* Basic implementation of setting flags for host launch option.
* Check in 'CHostState::LoadConfig' if -launcher is below 1.. if condition is met the cfg's will be executed from 'CHostState::LoadConfig'.
* Added 'StringIsDigit' utility.
2022-05-24 02:23:37 +02:00