3305 Commits

Author SHA1 Message Date
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
Kawe Mazidjatari
caba6a7aba 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.
2023-12-30 01:17:39 +01:00
Kawe Mazidjatari
0c56af38fc Server: add CServer::BroadcastMessage()
Add CServer::BroadcastMessage and rename CServer::FrameJob parameter.
2023-12-29 23:06:49 +01:00
Kawe Mazidjatari
0bc0f71a25 MaterialSystem: add note 2023-12-29 23:05:01 +01:00
Kawe Mazidjatari
0ba4c6a867 NVIDIA: make vars static 2023-12-27 23:39:01 +01:00
Amos
492af0d5d1 Fix dedicated compile errors 2023-12-27 13:22:33 +01:00
Kawe Mazidjatari
2ce819712a 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.
2023-12-26 23:42:44 +01:00
Kawe Mazidjatari
23b856d3f5 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.
2023-12-26 16:54:29 +01:00
Kawe Mazidjatari
9254ac2de3 Recast: fix:rcBuildLayerRegions missing areaType
Merge recastnavitagion/recastnavitagion@ddaa361b08
2023-12-26 16:24:43 +01:00
Kawe Mazidjatari
20112679cd Engine: reversed some CGame field names
Reversable thanks to the CInputSystem rebuild.
2023-12-26 11:32:27 +01:00
Kawe Mazidjatari
be53feed65 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.
2023-12-26 02:37:07 +01:00
Kawe Mazidjatari
1ea7edd009 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.
2023-12-26 01:42:54 +01:00
Kawe Mazidjatari
10017fd84e NVIDIA: only run latency on success
Only run latency markers if NvAPI_D3D_SetSleepMode returned NVAPI_OK.
2023-12-25 23:43:41 +01:00
Kawe Mazidjatari
af8a3add00 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.
2023-12-25 22:36:35 +01:00
Kawe Mazidjatari
8791745ad4
Merge pull request #115 from Mauler125/nvidia_reflex_markers
NVIDIA latency marker implementation
2023-12-25 19:39:14 +01:00
Kawe Mazidjatari
3873cc81c2 InputSystem: rename function parameter 2023-12-25 19:36:59 +01:00
Kawe Mazidjatari
acbf0352da 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!
2023-12-25 19:24:42 +01:00
Kawe Mazidjatari
0251c59227 NVIDIA: properly enqueue frame ID
Sync Frame ID between main thread and render thread, this changes makes the integration PASS the reflex test utility.
2023-12-25 19:23:01 +01:00
Kawe Mazidjatari
c3fed1dc2a 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.
2023-12-25 18:47:05 +01:00
Kawe Mazidjatari
bbb5811bbf 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.
2023-12-25 02:24:23 +01:00
Kawe Mazidjatari
f08f9dd4cb NVIDIA: low latency code decouple 2023-12-25 01:46:39 +01:00
Kawe Mazidjatari
6575f80447 NVIDIA: add TRIGGER_FLASH marker to input event handler 2023-12-24 22:32:58 +01:00
Kawe Mazidjatari
0e62280896 NVIDIA: add PC_LATENCY_PING marker to msg pump 2023-12-24 20:38:50 +01:00
Kawe Mazidjatari
aa1a43ac4f Tier0: add template inline for FindPatternSIMD
This allows for directly setting a function pointer without double casting it, and significantly reduce code verbosity.
2023-12-24 20:38:07 +01:00
Kawe Mazidjatari
76b927e3b0 Tier1: temporarily comment
Unused and causes errors due to unimplemented mutex class (needs to be reversed still).
2023-12-24 16:33:20 +01:00
Kawe Mazidjatari
d42ca04e8c EngineAPI: key event dispatcher rebuild 2023-12-24 16:29:42 +01:00
Kawe Mazidjatari
30518e1f64 InputSystem: make InputEventCallback_t return type bool 2023-12-24 15:23:05 +01:00
Kawe Mazidjatari
98d47ce8ed InputSystem: add reversed KeyInfo_t and KeyEvent_t struct
Almost fully mapped out, the unknown fields seem to be unused or padding.
2023-12-24 15:17:08 +01:00
Kawe Mazidjatari
fc668bb7f5 InputSystem: add comment to field 2023-12-24 15:15:17 +01:00
Kawe Mazidjatari
00622ec968 InputSystem: add inline helpers 2023-12-24 03:05:29 +01:00
Kawe Mazidjatari
ccfef821b0 InputSystem: fixup enumerants and controller structs
Enumerants:
* ButtonCode_t::JOYSTICK_MAX_BUTTON_COUNT = 32 (previously 26, incorrect...).
* AnalogCode_t::JOYSTICK_FIRST_AXIS = 2 (previously 4, incorrect...).
* Added: ButtonCode_t::KEY_CREDITSIGN (k104, last key).
* Fixed up Xbox controller enums.

Structs xdevice_t:
* Added partially reversed unkownhiddevice_t structure (used for non-xbox hardware).

General:
* Added static assertions for structure sizes.
2023-12-24 02:58:11 +01:00
Kawe Mazidjatari
e8f480bba4 Tier1: make CTier1AppSystem iface public 2023-12-24 02:48:49 +01:00
Kawe Mazidjatari
01b805f801 InputSystem: joystick deadzone indices and event input callback types
Adjust iface accordingly.
2023-12-23 19:37:39 +01:00
Kawe Mazidjatari
4ba6227759 InputSystem: largely reversed struct and fully reversed iface
Struct has been largely mapped out (still requires a bit of work, mostly the Xbox/Hid data structures). The vftable has been fully mapped out.
2023-12-23 17:23:17 +01:00
Kawe Mazidjatari
69e64ac8c3 Create utlstringmap.h 2023-12-23 17:21:20 +01:00
Kawe Mazidjatari
953bf9bd0d InputSystem: update button codes
Xbox enumerants have changed as the game supports Xbox One controllers. Since the joystick button count has changed, 'JOYSTICK_MAX_BUTTON_COUNT' has also changed which affects the size of datatypes used by the CInputSystem class.
2023-12-23 01:51:31 +01:00
Kawe Mazidjatari
d608c734bd Add/update core headers 2023-12-23 01:22:02 +01:00