3266 Commits

Author SHA1 Message Date
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
Kawe Mazidjatari
02b0a5c7df InputSystem: make InputEventCallback_t return type bool 2024-04-05 17:12:51 +02:00
Kawe Mazidjatari
99a24d9254 InputSystem: add reversed KeyInfo_t and KeyEvent_t struct
Almost fully mapped out, the unknown fields seem to be unused or padding.
2024-04-05 17:10:59 +02:00
Kawe Mazidjatari
44cf99acc1 InputSystem: add comment to field 2024-04-05 17:10:59 +02:00
Kawe Mazidjatari
0067a57aa8 InputSystem: add inline helpers 2024-04-05 17:10:58 +02:00
Kawe Mazidjatari
b72f02d123 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.
2024-04-05 17:10:58 +02:00
Kawe Mazidjatari
94d01c39b3 Tier1: make CTier1AppSystem iface public 2024-04-05 17:10:58 +02:00
Kawe Mazidjatari
4e3fdab7e7 InputSystem: joystick deadzone indices and event input callback types
Adjust iface accordingly.
2024-04-05 17:10:58 +02:00
Kawe Mazidjatari
bbebbdac13 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.
2024-04-05 17:09:47 +02:00
Kawe Mazidjatari
bd35ec6525 Create utlstringmap.h 2024-04-05 17:04:53 +02:00
Kawe Mazidjatari
e64e5674c8 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.
2024-04-05 16:55:29 +02:00
Kawe Mazidjatari
7d0b2d7450 Add/update core headers 2024-04-05 16:53:51 +02:00
Kawe Mazidjatari
1b2ce75e81 Add PCLSTATS marker 2024-04-05 16:49:30 +02:00
Kawe Mazidjatari
59e0bfa10b NVIDIA: initial implementation of latency markers 2024-04-05 16:45:05 +02:00
Kawe Mazidjatari
d3d80398e3 Add new reversed packet header flags
These flags only exist in the respawn version of the engine. Renamed 'CNetChan::unknown_challenge_var' to 'CNetChan::m_nRealTimePackets'. This field counts the number of packets sent while the frame time wasn't prescaled with the 'host_timescale' cvar, see r5apex.exe+0x3093C0 (140309FC0).
2024-04-05 16:41:11 +02:00
Kawe Mazidjatari
c8b5f47c80 Add packet header flags 2024-04-05 16:41:11 +02:00
Kawe Mazidjatari
51b866f6a1 NVIDIA: check if adapter is from NVIDIA in GFX_SetLatencyMarker()
Moved adapter vendor check to its own func, added a global which could be used to fully disable the low latency system. Also added groundwork for the (future) PCL stats implementation.
2024-04-05 16:41:11 +02:00
Kawe Mazidjatari
82c522a424 Use size types for keyvaluesystem interface 2024-04-05 16:41:11 +02:00
Kawe Mazidjatari
f609f16427 Don't compile debug code in cert builds 2024-04-05 16:41:11 +02:00
Kawe Mazidjatari
fe650711c2 ConCommand: marked 'script(_...)' FCVAR_DEVELOPMENTONLY 2024-04-05 16:41:11 +02:00
Kawe Mazidjatari
144d5f62e1 IDetour: code refactor
Utilize the new IDetour::DetourSetup() code, IDetour::Attach and IDetour::Detach have been removed in favor of this (significantly reduces chance of user error). Since the template check happens in the idetour header, it is much more aggressive on type mismatches, such as a difference in parameter types, between the function and detour, will now raise a compile time error. As a result, some type mismatches have been fixed in this commit as well.
2024-04-05 16:41:09 +02:00
Kawe Mazidjatari
3831058f81 New method for IDetour
This will deprecate IDetour::Attach and IDetour::Detatch. This should reduce the chances of potential errors caused by using the wrong function in the wrong method (e.g. using DetourAttach in IDetour::Detatch).
2024-04-05 16:41:09 +02:00
Kawe Mazidjatari
c86f0c5c6a Check if we have enough room for new execution markers
Make sure we always have enough room for new execution markers. Engine normally truncates the head of the vector if out of room; we want to avoid it as this will cause the cookies to shift, and thus cause them to misalign with their respective commands.
2024-04-05 16:41:08 +02:00
Kawe Mazidjatari
699a4ce464 Implement CCommandBuffer
Code is based on Valve's implementation, with the following changes:
- Usage of 64bit signed size types.
- Usage of const where possible.
- Removal of field 'CCommandBuffer::m_nLastUsedArgSSize'.
2024-04-05 16:39:22 +02:00
Kawe Mazidjatari
ea8074dff9 Fix bug in utllinkedlist
Should return template type (default 'unsigned short') instead of int as Count.
2024-04-05 16:34:30 +02:00
Kawe Mazidjatari
a8312517f4 CCommand adjustments
Moved inlines to header; made ArgC return 32bit integer instead.
2024-04-05 16:34:30 +02:00
Kawe Mazidjatari
5967a0d011 Add additional warning codes to thirdparty warning suppressor 2024-04-05 16:34:29 +02:00
Kawe Mazidjatari
8c22d9ed80 Fix compiler warnings on Visual Studio 2017
Should not be a constexpr, this caused cryptic errors in template code when compiling the code with older compilers.
2024-04-05 16:34:29 +02:00
Kawe Mazidjatari
e2b231f4e0 Fix declaration/implementation mismatch 2024-04-05 16:34:29 +02:00
Kawe Mazidjatari
16156ffd3a Add missing help strings 2024-04-05 16:34:29 +02:00
Kawe Mazidjatari
d57d3f0838 Add promo version cvars
Used for showing promo's like events such as tournaments.
2024-04-05 16:34:29 +02:00
Kawe Mazidjatari
8400ee769f Fix emblem misalignment 2024-04-05 16:34:29 +02:00
Kawe Mazidjatari
37139130be Update emblem for 2.4 release 2024-04-05 16:34:29 +02:00
Kawe Mazidjatari
b24e5815bc Fix memory leak in token authentication system
Must free claims after creating them!
2024-04-05 16:34:29 +02:00
Kawe Mazidjatari
6bc15b50b5 Put lag compensation clamping in a separate method, under a cvar that is disabled for now
There have been reports of hit registration issues, this is most likely caused by the clamping system to mitigate an exploit. Put behind a convar and disabled for now until debugged.
2024-04-05 16:34:29 +02:00
Kawe Mazidjatari
fa76747baa Show a more detailed error if the EULA request failed 2024-04-05 16:34:29 +02:00
Kawe Mazidjatari
901b4e13ba Bump sig cache version
Signatures changed
2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
c6f2c99619 Improve client-side online authentication error handling and UX
Display the error to the user without having to open the developer console or terminal window. This patch also adds printing to COM_ExplainDisconnection (which has been stripped out of the retail binary).
2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
1dea3575ef Must be compiled for client dll too 2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
2fe902061e Don't check for accepted EULA versions if this is a dedicated server 2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
ec825962b6 These files are now located in the bin dir 2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
be8ee3d0b1 SDK cleaner script is now in the bin dir 2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
1687b633f3 Update SDK cleaner script 2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
209045e10c Patch is no longer needed
This file has been moved over to the VPK, therefore, formatting will always be identical.
2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
5e53a75571 Drop a warning when someone fails authentication 2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
98a5cdc246 Spawn AI hints so the entire AI Network can be cached 2024-04-05 16:34:27 +02:00
Kawe Mazidjatari
1b5238eab0 Rename VPK build scripts 2024-04-05 16:31:08 +02:00