3341 Commits

Author SHA1 Message Date
Kawe Mazidjatari
f0714a43bb 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-01-12 01:26:33 +01:00
Kawe Mazidjatari
55e82c08fd 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-01-12 01:24:11 +01:00
Kawe Mazidjatari
47d334e32e AppSystem: implement destructors
Need to be implemented when these are subclassed and implemented (not declared) in the SDK or tools.
2024-01-12 01:19:49 +01:00
Kawe Mazidjatari
b29762e553 FileSystem: fix subclassing
Should use CTier1AppSystem.
2024-01-12 01:01:58 +01:00
Kawe Mazidjatari
cd82e22ea3 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-01-12 00:52:07 +01:00
Kawe Mazidjatari
9f51c2424e VstdLib: reimplement CKeyValuesSystem
NOTE: reimplementation is for tools only, the game and SDK still uses the engine's implementation.
2024-01-12 00:32:17 +01:00
Kawe Mazidjatari
078c241a0d 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-01-12 00:25:19 +01:00
Kawe Mazidjatari
057ccd3f86 Tier1: enable CUtlBuffer char conversion
Changed types to const char* instead of char*.
2024-01-12 00:17:53 +01:00
Kawe Mazidjatari
05f12ab6cc Tier1: fix CUtlMemoryPool::CBlob structure
Only contains the 'previous' pointer, freeing memory now works.
2024-01-12 00:16:36 +01:00
Kawe Mazidjatari
8d4ca8a59f Tier1: update memstack implementation
CMemoryStack::m_unkSize is always initialized to 0x100000 in apex.
2024-01-09 00:58:31 +01:00
Kawe Mazidjatari
6bdc8f2426 Tier1: enable CMemoryStack and fix compile errors in debug
Define missing MemAlloc_* inlines.
2024-01-08 22:59:35 +01:00
Kawe Mazidjatari
92639b6793 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-01-08 22:48:58 +01:00
Kawe Mazidjatari
dda8c1255d Pylon: fix bulkCheck request body
Array should be in "players".
2024-01-07 15:24:40 +01:00
Kawe Mazidjatari
fc1c911c81 VPhysics: add CPhysicsCollision singleton
Used for CStudioVCollide::~CStudioVCollide().
2024-01-07 14:19:31 +01:00
Kawe Mazidjatari
8aa8323ea4 DataCache: enable old gather props in proper location
Fix hack and handle this properly.
2024-01-07 12:28:31 +01:00
Kawe Mazidjatari
5b5effa964 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-01-07 11:45:03 +01:00
Kawe Mazidjatari
c54777d370 DataCache: rework FindUncachedMDL error handling
Remove unnecessary/duplicate code.
2024-01-07 02:57:54 +01:00
Kawe Mazidjatari
743074ac47 DataCache: rename studiodata_t member 2024-01-07 02:57:30 +01:00
Kawe Mazidjatari
51858ed012 DataCache: improve FindUncachedMDL error handling
Just use a single branch.
2024-01-07 02:05:14 +01:00
Kawe Mazidjatari
7c4d080406 DataCache: rename studiodata_t::GetStudioCache()
Rename studiodata_t::GetStudioCache() to studiodata_t::GetModelCache().
2024-01-07 02:02:40 +01:00
Kawe Mazidjatari
686e65cc70 DataCache: add missing check
Must check on this animrig cache handle as well.
2024-01-07 01:44:09 +01:00
Kawe Mazidjatari
bdb6be6255 DataCache: add missing checks
Should check for model cache handle again, and also check anim cache handle.
2024-01-07 01:42:26 +01:00
Kawe Mazidjatari
ab79606c7f 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-01-07 01:39:15 +01:00
Kawe Mazidjatari
5979153306 DataCache: clear fallback handler if main pak gets unloaded
If common.rpak is unloaded, the fallback model handles/pointers become invalid.
2024-01-07 00:02:26 +01:00
Kawe Mazidjatari
440a29513e DataCache: fix inline crash 2024-01-06 23:56:19 +01:00
Kawe Mazidjatari
e416bdbbfe 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-01-05 01:22:55 +01:00
Kawe Mazidjatari
6b708e33ea 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-01-04 21:19:32 +01:00
Kawe Mazidjatari
5615400c07 DataCache: remove legacy inlines 2024-01-04 21:01:30 +01:00
Kawe Mazidjatari
3ab3171018 Studio: fix compile error
Include for CRefCounted.
2024-01-04 18:50:43 +01:00
Kawe Mazidjatari
adf12a3c22 DataCache: cleanup mdlcache code
Cleanup and fixup CMDLCache::GetVCollide (originally named CMDLCache::GetStudioHdr which was incorrect).
2024-01-04 16:12:25 +01:00
Kawe Mazidjatari
96a3bb259c VPhysics: add vcollide structure 2024-01-04 16:09:31 +01:00
Kawe Mazidjatari
4df2c83247 Tier1: add refcount class 2024-01-04 16:08:27 +01:00
Kawe Mazidjatari
eb07b3eafa
Merge pull request #118 from Mauler125/idetour_iface_refactor
IDetour: interface refactor
2024-01-02 18:02:09 +01:00
Kawe Mazidjatari
f428e09654 Patch: make const 2024-01-02 17:30:39 +01:00
Kawe Mazidjatari
91ba2b543d Texture: fix crash caused by unused define
GAMEDLL_S3 is no longer defined due to deprecation.
2024-01-02 17:28:12 +01:00
Kawe Mazidjatari
ef109f9315 Patch: remove GAMEDLL compile time checks
GAMEDLL_S# defines are no longer used.
2024-01-02 17:09:14 +01:00
Kawe Mazidjatari
4cfcdcd863 ModelLoader: don't compile sprite functions for dedicated 2024-01-02 17:08:08 +01:00
Kawe Mazidjatari
555ab1f9e0
README: update support list 2024-01-02 15:26:08 +01:00
Kawe Mazidjatari
97db990d94 CMake: remove OPTION_GAMEDLL
Only S3 is supported moving forward; see commit e825a1e7.
2024-01-02 15:24:54 +01:00
Kawe Mazidjatari
e825a1e7a8 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-01-02 15:21:36 +01:00
Kawe Mazidjatari
59a506305f CMemory: add reference overload
Assign pointer to reference.
2024-01-02 14:56:28 +01:00
Kawe Mazidjatari
b25bc7c455 RConServer: remove extraneous copy
CSocketCreator::GetAcceptedSocketAddress() returns a reference.
2024-01-01 20:09:32 +01:00
Kawe Mazidjatari
18235b43f3 Pylon: fix typo 2024-01-01 16:46:16 +01:00
Kawe Mazidjatari
073abad6a8 CEngine: rename fields 2024-01-01 16:46:02 +01:00
Kawe Mazidjatari
bf5734f5d6 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.
2023-12-30 17:38:54 +01:00
Kawe Mazidjatari
d592bb2241 InputSystem: fix controller hold keys not working
Should've been !keyInfo.m_bKeyDown.
2023-12-30 17:32:38 +01:00
Kawe Mazidjatari
b618daa694 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.
2023-12-30 17:31:55 +01:00
Kawe Mazidjatari
c5808e1117 Server: improve extended client class
Use setters/getters and make members private and only accessible from CClient or CClientExtended.
2023-12-30 15:05:14 +01:00
Kawe Mazidjatari
b1eb8ae26f CL_MoveEx: const correctness 2023-12-30 14:33:42 +01:00
Kawe Mazidjatari
89320b48ad Server: rename 'ServerPlayer_t' to 'CClientExtended'
A more correct name + comments as to why this structure exists.
2023-12-30 02:51:02 +01:00