1113 Commits

Author SHA1 Message Date
Kawe Mazidjatari
14f409c8c6 Update packedstore.cpp 2022-06-02 02:00:35 +02:00
Kawe Mazidjatari
649060c8cc Update packedstore.cpp 2022-06-02 01:59:03 +02:00
Kawe Mazidjatari
f824954640 Update packedstore.cpp 2022-06-02 01:58:29 +02:00
Kawe Mazidjatari
ec7582e476 Fixed VPK repack with multiple files
VPK's could now be repacked with compression and multiple files. The output is identical to the input as far as currently tested (mp_rr_canyonlands_staging).
2022-06-02 01:57:18 +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
rexx
5e58b7a5d3 fix access violation on script command
running "script_client" from main menu would cause an access violation when attempting to access m_hVM from the CSquirrelVM instance for the client vm, which has not been created by this point
2022-06-01 19:57:39 +01:00
PixieCore
6ea1a8bebc Executing commands from launcher. 2022-05-31 18:05:43 +02:00
Kawe Mazidjatari
f2472e9275 Fix dev menu not showing up when launching with sv_cheats v2.0.7_rc2 2022-05-30 22:28:03 +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
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
b3583cf005 Declare more common types in the global scope
This should had gone before the prior commit
2022-05-30 01:50:53 +02:00
Kawe Mazidjatari
399131d57d Add additional useful string utils 2022-05-30 01:50:21 +02:00
Kawe Mazidjatari
148a6f424c Update sqscript.cpp 2022-05-30 01:45:06 +02:00
Kawe Mazidjatari
4a512522ab Set hostname via 'hostname' ConVar instead v2.0.7_rc1 2022-05-29 02:32:00 +02:00
Kawe Mazidjatari
87157d3202 Update config files
Most of these are managed by the launcher. Keeping these here will cause problems as values we set in the launcher get reset by those.
2022-05-29 02:31:43 +02:00
Kawe Mazidjatari
97592fee97 Update playlists file
Added custom_ctf and adjusted visibility for certain items for the new RUI/VGUI server browser
2022-05-29 02:08:59 +02:00
Kawe Mazidjatari
86c1322aa0 Update sqinit.cpp 2022-05-29 02:08:07 +02:00
Kawe Mazidjatari
377b5dc262 Fix dereference crash if pointer exceeds int32 size
The crash only happened when the game executable had the ASLR flag set, because only then the pointer value overflowed the int32 type due to my bad cast
2022-05-29 00:39:13 +02:00
Kawe Mazidjatari
9aa665b374 Remove extraneous deref
Caused crash when calling sq_getstring/sq_getinteger.
Forgot to remove this after derefing it from the VM pointer.
2022-05-29 00:02:03 +02:00
Kawe Mazidjatari
84f6f37721 Rename unknown parameter
Unkmown parameter was socket (pServer + 0xC).
2022-05-28 23:36:29 +02:00
Kawe Mazidjatari
7bc18c8012 Align CServer structure with game's memory
Unknown fields have been padded to match the structure's size in memory. Iteration is now possible.
2022-05-28 23:14:01 +02:00
Kawe Mazidjatari
61c7dbf5c1 Fix memory leaks 2022-05-28 23:05:10 +02:00
Kawe Mazidjatari
f2cc3ea379 Set the native name field for squirrel functions 2022-05-28 22:28:18 +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
5adaf48d33 Add 'ShutdownHostGame()' to all VM's
Calling this before connecting to a different (remote or local) server avoids crashing in the VM's during shutdown.
2022-05-28 17:27:52 +02:00
Kawe Mazidjatari
6b6ee089f6 Add cleaner batch script
With the 'Clean SDK' button in the new GUI launcher, the user could remove all redundant files.
2022-05-28 17:14:42 +02:00
Kawe Mazidjatari
e5e0d528f0 Parse playlists file directly after loading it
No longer need a thread that loops and waits until its loaded into memory before parsing it.
2022-05-28 17:07:30 +02:00
Kawe Mazidjatari
79d602c274 KeyValues class rebuild (see description)
Class has been mostly copied from the Valve SourceSDK.
Modified to fit this particular engine.

Modifications include:
* More consistent naming.
* Using c++ style casts over c style casts.
* Using c++ datatypes for assigning default.
  - nullptr and size_t for pointers and size types.
2022-05-28 16:31:38 +02:00
Kawe Mazidjatari
dc9798d455 Add KeyValue leak tracing
CUtlVector has to be rebuild for this to work
2022-05-28 16:28:26 +02:00
Kawe Mazidjatari
c8432acc9a Add 'tier0/commonmacros.h' to precompiled header 2022-05-28 16:15:39 +02:00
Kawe Mazidjatari
e2b43b9753 Update keyvaluesystem
* Return global pointer with 'KeyValuesSystem()'.
* Declare 'bCreate' as false by default for 'GetSymbolForString()' and 'GetSymbolForStringCaseSensitive()'.
2022-05-28 16:14:53 +02:00
Kawe Mazidjatari
306174afdf Fix typo 2022-05-28 16:12:56 +02:00
Kawe Mazidjatari
059a394523 Add commonmacros.h and strtools.h/.cpp from SourceSDK
strtools has been redacted to just what we need
2022-05-28 16:12:37 +02:00
Kawe Mazidjatari
b19cf95420 Fix IFileSystem::RemoveSearchPath bug 2022-05-28 16:10:52 +02:00
Kawe Mazidjatari
c808aa077d Light KeyValues cleanup 2022-05-28 02:24:57 +02:00
Kawe Mazidjatari
dbec823be6 FileSystem improvements
* Added vftable interface for 'IFileSystem::RemoveSearchPath'.
* Added hook for 'CBaseFileSystem::AddSearchPath'.
* Added hook for 'CBaseFileSystem::RemoveSearchPath'.
* Added method in KeyValues for loading a KV file and parsing it via the game exe (loads from cache, vpk and disk).
* Added method in KeyValues to parse GameInfo.txt when the engine loads this.
2022-05-28 02:05:54 +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
2cc47f60e2 Cleanup for 'StreamDB_Init' 2022-05-27 22:31:52 +02:00
Kawe Mazidjatari
83c57fbd99 Fix compiler error 2022-05-27 22:31:12 +02:00
Kawe Mazidjatari
facee1a871 Fix reference to natvis file
libcppkore
2022-05-27 17:00:12 +02:00
Kawe Mazidjatari
112f0a25b7 Update IConsole.h 2022-05-27 16:29:47 +02:00
Kawe Mazidjatari
bcd75b354a Fix suggest window drawing below server browser window 2022-05-27 16:28:37 +02:00
Kawe Mazidjatari
de2e91220d Cast to wider type 2022-05-27 16:28:03 +02:00
Kawe Mazidjatari
28ff12272f Cleanup 2022-05-27 14:39:43 +02:00
Kawe Mazidjatari
7db3e16a97 Align and use SQVM struct for builds below S3 2022-05-27 14:39:29 +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
555eb264c1 Server browser cleanup 2022-05-27 02:39:08 +02:00