3362 Commits

Author SHA1 Message Date
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
Kawe Mazidjatari
e551e58a7d Server: rename 'ServerPlayer_t' to 'CClientExtended'
A more correct name + comments as to why this structure exists.
2024-04-05 17:19:30 +02:00
Kawe Mazidjatari
0cab94fb12 Server: sync client's clock with server's
This should in theory fix the server and client desync that takes place after multiple hours of uptime without disconnecting or reloading. Note that in this version of the engine the server tick is only send on connect (Titanfall 2 does seem to send it every tick, as this netmsg is also responsible for updating the server percentage on the 'cl_showfps' HUD, which does work as designed). The patched code still writes a 'statistics only' server tick update every tick, but only sends full if the interval time has been reached for that particular client instance.
2024-04-05 17:19:30 +02:00
Kawe Mazidjatari
35de4a2c15 Server: add CServer::BroadcastMessage()
Add CServer::BroadcastMessage and rename CServer::FrameJob parameter.
2024-04-05 17:19:29 +02:00
Kawe Mazidjatari
d8e3aa85f9 MaterialSystem: add note 2024-04-05 17:19:29 +02:00
Kawe Mazidjatari
a831494c43 NVIDIA: make vars static 2024-04-05 17:19:29 +02:00
Amos
35bec64a5f Fix dedicated compile errors 2024-04-05 17:19:29 +02:00
Kawe Mazidjatari
abe6d10830 NVIDIA: enable gfx_nvnUseMarkersToOptimize by default
Enabled by default, and removed playerprofile flag as we want to be able to disable this in the future may it cause problems. All tests done so far (on different hardware) yielded more latency reduction/performance improvements. Also added updated note for convar promo_version_accepted.
2024-04-05 17:19:29 +02:00
Kawe Mazidjatari
1f7bbe5b92 Recast: make detail mesh edge detection more robust
Merge recastnavitagion/recastnavitagion@c393777d26
Instead of using a distance check which can fail at large magnitudes due
to low precision we can check whether the edges are actually on the
hull.
2024-04-05 17:19:29 +02:00
Kawe Mazidjatari
e3bf2036b3 Recast: fix:rcBuildLayerRegions missing areaType
Merge recastnavitagion/recastnavitagion@ddaa361b08
2024-04-05 17:19:28 +02:00
Kawe Mazidjatari
714674ae33 Engine: reversed some CGame field names
Reversable thanks to the CInputSystem rebuild.
2024-04-05 17:19:28 +02:00
Kawe Mazidjatari
365448b8c7 MaterialSystem: fix console not drawing in the 4:3/5:4 aspect ratio modes
DrawImGui should be called BEFORE ID3D11DeviceContext::ClearRenderTargetView() or ID3D11DeviceContext::End(). Moved drawing code to SpinPresent which is just before the clear/end calls are being made. Console now draws in the 4:3/5:4 aspect ratio video modes.
2024-04-05 17:19:28 +02:00
Kawe Mazidjatari
77a20f4d9e NVIDIA: move markers to actual IDXGISwapChain::Present runtime call
Testing revealed better latency reduction when moved directly here as we also take into account the additional buffy copy's the game does in SpinPresent, our new render thread frame limiter and and ImGui. The difference is very large when the render thread frame limiter is used. The code still passes NVIDIA's reflex testing utility after this patch.
2024-04-05 17:19:28 +02:00
Kawe Mazidjatari
fde79e9f93 NVIDIA: only run latency on success
Only run latency markers if NvAPI_D3D_SetSleepMode returned NVAPI_OK.
2024-04-05 17:19:28 +02:00
Kawe Mazidjatari
81ccefb74d NVIDIA: limit to 1 sleep per frame
The purpose of this bool was to only limit nv sleep to 1 per frame, but the bool was never reset.
2024-04-05 17:19:28 +02:00
Kawe Mazidjatari
c954640527 InputSystem: rename function parameter 2024-04-05 17:12:53 +02:00
Kawe Mazidjatari
b162b10598 NVIDIA: always run PC Latency stats
PCLStats is not NVIDIA hardware bound as per Reflex's documentation, and runs separately from the NVIDIA Reflex code. Always enable!
2024-04-05 17:12:52 +02:00
Kawe Mazidjatari
735a9e0489 NVIDIA: properly enqueue frame ID
Sync Frame ID between main thread and render thread, this changes makes the integration PASS the reflex test utility.
2024-04-05 17:12:52 +02:00
Kawe Mazidjatari
83b95d23c9 MaterialSystem: Expose the proper pointer
The first pointer was a pointing to a pointer to g_MaterialSystem. The new pointer points directly to g_MaterialSystem. Also added CMaterialSystem::GetCurrentFrameCount() for g_FrameNum.
2024-04-05 17:12:52 +02:00
Kawe Mazidjatari
4d521b60c9 Engine: fix incorrect function names
Was actually pointing to Host_Init_DuringVideo, not Host_Init. Added all Host_Init functions to avoid confusion in the future.
2024-04-05 17:12:52 +02:00
Kawe Mazidjatari
65bff96db1 NVIDIA: low latency code decouple 2024-04-05 17:12:52 +02:00
Kawe Mazidjatari
fd8b2f255e NVIDIA: add TRIGGER_FLASH marker to input event handler 2024-04-05 17:12:52 +02:00
Kawe Mazidjatari
47dfc39ad5 NVIDIA: add PC_LATENCY_PING marker to msg pump 2024-04-05 17:12:51 +02:00
Kawe Mazidjatari
053a1ca9e0 Tier0: add template inline for FindPatternSIMD
This allows for directly setting a function pointer without double casting it, and significantly reduce code verbosity.
2024-04-05 17:12:51 +02:00
Kawe Mazidjatari
05352d9d17 Tier1: temporarily comment
Unused and causes errors due to unimplemented mutex class (needs to be reversed still).
2024-04-05 17:12:51 +02:00
Kawe Mazidjatari
13fa6d902b EngineAPI: key event dispatcher rebuild 2024-04-05 17:12:51 +02:00