20 Commits

Author SHA1 Message Date
Kawe Mazidjatari
27eae42b10 RCON client improvement
Use 3rd argument as password instead of 'rcon_password' ConVar if arg count is > 2.
2022-06-13 01:03:36 +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
4cf43e0d61 Fix invalid pointer for 'VPK_Mount_f'
g_pFullFileSystem is a pointer to g_pFileSystem_Stdio in the compiled module.
Inherit CBaseFileSystem for CFileSystem_Stdio (second VFTable pointer).
Additional cleanup.
2022-06-12 12:14:31 +02:00
Kawe Mazidjatari
461920a970 Update terminology entirely for packedstore.h/.cpp
VPK tooling also works on the R1 game (Titanfall 1)
2022-06-06 14:54:22 +02:00
Kawe Mazidjatari
13f518d773 Fixed VPK manifest bug
Fixed bug where VPK root character gets written to the manifest file.
Show detailed data sharing statistics.
2022-06-05 20:55:34 +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
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
6fbe900ba9 Initial implementation of compressed VPK rebuilding
The 'fs_pack_vpk' allows compressing specific files into a VPK (compressed). This implementation has better compression ratio's then currently available VPK tools with compression (at the cost of speed).
The implementation is early, a directory iterator with a files for flags is planned soon to fully rebuild VPK's on-demand. A dedicated standalone program is also planned.

The output dir and archive formats should match 1:1 with the original game
2022-05-30 02:56:15 +02:00
Kawe Mazidjatari
e735683940 SquirrelVM refactor
The game uses 2 types, CSquirrelVM (mostly exposed to the VScript API of the engine) and HSQUIRRELVM (mostly used for internal squirrel functions like sq_pushbool etc..).

This refactor properly splits the CSquirrelVM* functions from the HSQUIRRELVM (SQVM*) ones. The functions have also been renamed accordingly and the prototypes have been adjusted to use the correct pointer type.
2022-05-28 22:02:00 +02:00
Kawe Mazidjatari
52b8755219 FileSystem improvements
* Added proper pointer to g_pFileSystem_Stdio.
* Renamed existing one to g_pFullFileSystem (correct name).
* Obtain g_pFileSystem from the same constructor as g_pFileSystem_Stdio.
2022-05-27 22:38:49 +02:00
Kawe Mazidjatari
e6ef3d71f1 Rename variable 'g_pIConsole' to 'g_pConsole' 2022-05-27 02:46:13 +02:00
Kawe Mazidjatari
58d46c0a8c Rename class 'IBrowser' to 'CBrowser'
Renamed 'g_pIBrowser' to 'g_pBrowser' as well
2022-05-27 02:44:36 +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
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
f14b3e5dfa Confirmed working on <S3 2022-05-19 21:29:40 +02:00
Kawe Mazidjatari
62b062df6a Mat_CrossHair_f works and CMaterialGlue structure aligns 2022-05-19 19:37:54 +02:00
PixieCore
5655b8c759 Implementation for rpak swap. Read description.
* RTech::GetPakLoadedInfo returns a reference now instead of a copy. Make sure to check the pointer is valid from now on if dealing with the returned pak entry.
* RTech::GetPakLoadedInfo now has a overloaded function that takes string as argument for searching an pak entry.
* new ConCommand pak_swap which has Pak_Swap_f as callback.
* Pak_Swap_f performs pak unload and then load again.
* pak_requestunload can now be used with pak name
2022-05-19 00:47:16 +02:00
Kawe Mazidjatari
6dff43bc75 Move and rename ConCommand callbacks appropriately 2022-05-16 21:15:25 +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