3487 Commits

Author SHA1 Message Date
Kawe Mazidjatari
6f11fffe63 Tier0: fix netconsole and revpk compile error in debug
CCommandLine isn't implemented in tools, thus unresolved external symbol errors will be thrown. HushAsserts() was unused and therefore removed which fixes these errors.
2024-04-05 17:46:52 +02:00
Kawe Mazidjatari
89bb7f35c8 KeyValues: fix singleton accessor compile errors
Make each instance implement the accessor instead of the KeyValues system itself.
2024-04-05 17:46:51 +02:00
Kawe Mazidjatari
ab58decd9b CMake: add ReVPK project, standalone VPK tool
Standalone VPK tool that does everything the VPK tool implemented in the dedicated server does (pack, unpack), but independent from the game's runtime.
2024-04-05 17:44:07 +02:00
Kawe Mazidjatari
5eb784a882 FileSystem: add standalone implementation
Standalone FileSystem implementation, allowing SDK code to be used in tools without adjusting them as the vtables remain identical. NOTE that this reimplementation is partial and only contains the reading and writing of files to/from buffers or disk as that's what we are mainly interested at. We can always implement the other methods when needed.

NOTE: the filesystem singleton accessor (CFileSystem_Stdio* FileSystem()) has been moved to an implementation file instead of being inline as this would allow existing code to link to the tools implementation instead.
2024-04-05 17:42:55 +02:00
Kawe Mazidjatari
891a7439f4 AppSystem: implement destructors
Need to be implemented when these are subclassed and implemented (not declared) in the SDK or tools.
2024-04-05 17:42:54 +02:00
Kawe Mazidjatari
faa359183e FileSystem: fix subclassing
Should use CTier1AppSystem.
2024-04-05 17:42:54 +02:00
Kawe Mazidjatari
ee82d5d8e0 Tier1: move KeyValues class to Tier1
The KeyValues class belongs here. Also reimplemented most loading methods for KeyValues, and adjusted the VPK building code to account for it. Pointers to the engine's implementation of KeyValues have been moved to a separate header ('keyvalues_iface.h'), as this allows external tools code to utilize the standalone KeyValues class implementation. Playlist utilities are completely separated from the KeyValues header; these have nothing to do with KeyValues other than manipulating a global KeyValues object for the playlists, and thus have been named as such and moved to rtech/playlists.
2024-04-05 17:42:05 +02:00
Kawe Mazidjatari
51986ec1c6 VstdLib: reimplement CKeyValuesSystem
NOTE: reimplementation is for tools only, the game and SDK still uses the engine's implementation.
2024-04-05 17:36:37 +02:00
Kawe Mazidjatari
b2ce189ba1 Tools: rename NETCONSOLE define to _TOOLS
Rename since this would actually be used for all tools. Also moved 'plat_time.cpp' to tier0 so anything could compile it.
2024-04-05 17:35:10 +02:00
Kawe Mazidjatari
07cc5420bc Tier1: enable CUtlBuffer char conversion
Changed types to const char* instead of char*.
2024-04-05 17:31:35 +02:00
Kawe Mazidjatari
654da2c816 Tier1: fix CUtlMemoryPool::CBlob structure
Only contains the 'previous' pointer, freeing memory now works.
2024-04-05 17:31:35 +02:00
Kawe Mazidjatari
f5854cccb5 Tier1: update memstack implementation
CMemoryStack::m_unkSize is always initialized to 0x100000 in apex.
2024-04-05 17:31:35 +02:00
Kawe Mazidjatari
ae681fc118 Tier1: enable CMemoryStack and fix compile errors in debug
Define missing MemAlloc_* inlines.
2024-04-05 17:31:35 +02:00
Kawe Mazidjatari
5721ffd22b Tier1: reimplement CUtlMemoryPool
Class is slightly modified; it uses 2 CBlob pointers instead of a single CBlob member. CUtlMemoryPool::m_pHeadOfFreeList is also replaced with the new CUtlMemoryPool::m_pPrev pointer. Code has been modified to accommodate this change and aligns with the assembly code of r5.
2024-04-05 17:29:12 +02:00
Kawe Mazidjatari
bd230506fb Pylon: fix bulkCheck request body
Array should be in "players".
2024-04-05 17:29:12 +02:00
Kawe Mazidjatari
a8074b4c99 VPhysics: add CPhysicsCollision singleton
Used for CStudioVCollide::~CStudioVCollide().
2024-04-05 17:26:16 +02:00
Kawe Mazidjatari
82b56fed5c DataCache: enable old gather props in proper location
Fix hack and handle this properly.
2024-04-05 17:26:16 +02:00
Kawe Mazidjatari
3d207d30a2 DataCache: rework datacache invalid data handling
This is a more reliable solution as pretty much all code patch in CMDLCache checks the ptr for NULL, but none of them do for 0xDEADFEEDDEADFEED (probably a debug only thing that somehow made it into this build). Patched out so the engine could deal with it properly. Anything interesting already gets logged from the SDK so we won't miss out on anything patching this out.
2024-04-05 17:26:16 +02:00
Kawe Mazidjatari
9755804031 DataCache: rework FindUncachedMDL error handling
Remove unnecessary/duplicate code.
2024-04-05 17:26:16 +02:00
Kawe Mazidjatari
22a0124a4f DataCache: rename studiodata_t member 2024-04-05 17:26:16 +02:00
Kawe Mazidjatari
1fe426fb65 DataCache: improve FindUncachedMDL error handling
Just use a single branch.
2024-04-05 17:26:16 +02:00
Kawe Mazidjatari
0578ba6bba DataCache: rename studiodata_t::GetStudioCache()
Rename studiodata_t::GetStudioCache() to studiodata_t::GetModelCache().
2024-04-05 17:26:16 +02:00
Kawe Mazidjatari
76240c5064 DataCache: add missing check
Must check on this animrig cache handle as well.
2024-04-05 17:26:15 +02:00
Kawe Mazidjatari
d20eeea5d4 DataCache: add missing checks
Should check for model cache handle again, and also check anim cache handle.
2024-04-05 17:26:15 +02:00
Kawe Mazidjatari
f961b3b013 DataCache: cleanup & improvements
* follow naming convention of studio.h.
* renamed studiocache_t to studiomodelcache_t.
* merged 'ModelHeader' struct with studiomodelcache_t.
* add 'physfile_t' structure.
2024-04-05 17:24:29 +02:00
Kawe Mazidjatari
a85d9a556e DataCache: clear fallback handler if main pak gets unloaded
If common.rpak is unloaded, the fallback model handles/pointers become invalid.
2024-04-05 17:24:29 +02:00
Kawe Mazidjatari
97c534ed60 DataCache: fix inline crash 2024-04-05 17:24:29 +02:00
Kawe Mazidjatari
1f4a96a3d6 DataCache: add proper fallback mdl handler and fix rendering
Add a proper class for dealing with fallback models and the warnings thereof. Also reverted the 'old_gather_props' removal, as otherwise fallback models won't draw (new gather props solution doesn't call CMDLCache::GetHardwareData()).
2024-04-05 17:24:29 +02:00
Kawe Mazidjatari
0f3a40ee1f DataCache: harden mdl error handling logic
Rebuild 'CMDLCache::GetPhysicsGeometry()' and properly handle missing cache pointers. Also cleaned up various methods in CMDLCache and renamed 'studiophysicscache_t' to 'studiophysicsref_t'. The changes made the 'old_gather_props' convar hack redundant and has thus been removed.
2024-04-05 17:24:28 +02:00
Kawe Mazidjatari
ad4e8c241b DataCache: remove legacy inlines 2024-04-05 17:24:28 +02:00
Kawe Mazidjatari
c99d7dd8c0 Studio: fix compile error
Include for CRefCounted.
2024-04-05 17:24:28 +02:00
Kawe Mazidjatari
4c798b1eb1 DataCache: cleanup mdlcache code
Cleanup and fixup CMDLCache::GetVCollide (originally named CMDLCache::GetStudioHdr which was incorrect).
2024-04-05 17:24:28 +02:00
Kawe Mazidjatari
17900c4150 VPhysics: add vcollide structure 2024-04-05 17:22:27 +02:00
Kawe Mazidjatari
2b53c32e1d Tier1: add refcount class 2024-04-05 17:21:08 +02:00
Kawe Mazidjatari
da1856f8b4 Patch: make const 2024-04-05 17:19:34 +02:00
Kawe Mazidjatari
0a168aa69d Texture: fix crash caused by unused define
GAMEDLL_S3 is no longer defined due to deprecation.
2024-04-05 17:19:34 +02:00
Kawe Mazidjatari
d44faded64 Patch: remove GAMEDLL compile time checks
GAMEDLL_S# defines are no longer used.
2024-04-05 17:19:34 +02:00
Kawe Mazidjatari
5763e0ee20 ModelLoader: don't compile sprite functions for dedicated 2024-04-05 17:19:34 +02:00
Kawe Mazidjatari
fcc70173be README: update support list 2024-04-05 17:19:34 +02:00
Kawe Mazidjatari
390084c9d8 CMake: remove OPTION_GAMEDLL
Only S3 is supported moving forward; see commit e825a1e7.
2024-04-05 17:19:34 +02:00
Kawe Mazidjatari
edc52ad669 IDetour: remove extraneous pointer assignments
Originally, we store the search results in a CMemory instance which we then assign to the actual function pointer. CMemory is just a pointer class; we can assign the results directly to the actual function pointer. This commit reduces a lot of code verbosity, and also reduced roughly 2KiB worth of static pointers in the resulting executable. This commit also officially deprecates the support for any GameDLL's below S3 (Season 3), since it makes more sense to port the assets from earlier/later games back to the version this SDK supports.
2024-04-05 17:19:32 +02:00
Kawe Mazidjatari
de3d3b49a1 CMemory: add reference overload
Assign pointer to reference.
2024-04-05 17:19:32 +02:00
Kawe Mazidjatari
a27f1b7fc9 RConServer: remove extraneous copy
CSocketCreator::GetAcceptedSocketAddress() returns a reference.
2024-04-05 17:19:31 +02:00
Kawe Mazidjatari
52b84fc3b7 Pylon: fix typo 2024-04-05 17:19:31 +02:00
Kawe Mazidjatari
4934528909 CEngine: rename fields 2024-04-05 17:19:31 +02:00
Kawe Mazidjatari
f2da299b99 InputSystem: add note to 'CGame::DispatchKeyEvent()'
These are hardcoded delay values for if you want to pick and swap an item from the ground. Perhaps nice to make a cvar and an in-game UI setting for adjusting them.
2024-04-05 17:19:31 +02:00
Kawe Mazidjatari
145943d3a6 InputSystem: fix controller hold keys not working
Should've been !keyInfo.m_bKeyDown.
2024-04-05 17:19:31 +02:00
Kawe Mazidjatari
ad7d3d14c8 Server: properly rate limit client side script execution
Blocking it all together will cause problem when user wants to reset their controller binds. Now we limit execution to 4 per second (default) which doesn't cause problems when resetting any configuration, while also preventing cfg hacks.
2024-04-05 17:19:30 +02:00
Kawe Mazidjatari
e2b508748d Server: improve extended client class
Use setters/getters and make members private and only accessible from CClient or CClientExtended.
2024-04-05 17:19:30 +02:00
Kawe Mazidjatari
8ae53d8336 CL_MoveEx: const correctness 2024-04-05 17:19:30 +02:00