3262 Commits

Author SHA1 Message Date
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
Kawe Mazidjatari
3327654413 Add PCLSTATS marker 2023-12-23 01:15:43 +01:00
Kawe Mazidjatari
5105ea771d NVIDIA: initial implementation of latency markers 2023-12-22 14:42:28 +01:00
Kawe Mazidjatari
9d5c237338 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).
2023-12-22 13:19:06 +01:00
Kawe Mazidjatari
78d6077b7f Add packet header flags 2023-12-22 13:12:55 +01:00
Kawe Mazidjatari
f312c408f0 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.
2023-12-20 22:21:31 +01:00
Kawe Mazidjatari
4c04d76ceb Use size types for keyvaluesystem interface 2023-12-20 21:14:18 +01:00
Kawe Mazidjatari
d76f3a712b Don't compile debug code in cert builds 2023-12-20 21:12:39 +01:00
Kawe Mazidjatari
219f0252b9 Add missing files
These are pre-generated, as mbedtls is reconfigured with a new CMakeLists.
2023-11-26 13:51:31 +01:00
Kawe Mazidjatari
e345be1e32 ConCommand: marked 'script(_...)' FCVAR_DEVELOPMENTONLY 2023-11-26 13:22:22 +01:00
Kawe Mazidjatari
e541814482 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.
2023-11-26 13:21:20 +01:00
Kawe Mazidjatari
e0a60a14e5 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).
2023-11-26 11:42:26 +01:00
Kawe Mazidjatari
fa2a005d34 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.
2023-11-25 17:41:08 +01:00
Kawe Mazidjatari
7648d19fa9 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'.

Code is tested and compiles on all supported compilers.
2023-11-25 12:00:47 +01:00
Kawe Mazidjatari
236dc31292 Fix bug in utllinkedlist
Should return template type (default 'unsigned short') instead of int as Count.
2023-11-25 11:29:58 +01:00
Kawe Mazidjatari
e5d8f46c61 CCommand adjustments
Moved inlines to header; made ArgC return 32bit integer instead.
2023-11-25 11:27:47 +01:00
Kawe Mazidjatari
167ef46dcb Add additional warning codes to thirdparty warning suppressor 2023-11-25 11:24:06 +01:00
Kawe Mazidjatari
26a7e90354 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.
2023-11-25 11:23:19 +01:00
Kawe Mazidjatari
35fe8dad04 Fix declaration/implementation mismatch 2023-11-25 11:21:51 +01:00
Kawe Mazidjatari
e269d9d548 Add missing help strings 2023-11-10 01:29:50 +01:00
Kawe Mazidjatari
4301c3c8d6 Add promo version cvars
Used for showing promo's like events such as tournaments.
2023-11-10 01:27:19 +01:00
Kawe Mazidjatari
8932a9bfec Fix emblem misalignment 2023-11-01 02:08:08 +01:00
Kawe Mazidjatari
46b9561ae9 Update emblem for 2.4 release 2023-11-01 01:49:24 +01:00
Kawe Mazidjatari
9c6417ee4e Fix memory leak in token authentication system
Must free claims after creating them!
2023-10-31 19:14:07 +01:00
Kawe Mazidjatari
278d24930b 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.
2023-10-25 23:31:02 +02:00
Kawe Mazidjatari
193cc9b19b Show a more detailed error if the EULA request failed 2023-10-25 23:29:37 +02:00
Kawe Mazidjatari
284f06a145 Bump sig cache version
Signatures changed
2023-10-22 17:01:12 +02:00
Kawe Mazidjatari
4ef4a0b803 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).
2023-10-22 17:00:56 +02:00
Kawe Mazidjatari
45adfb50f0 Must be compiled for client dll too 2023-10-22 16:57:21 +02:00
Kawe Mazidjatari
dbedacebbf Don't check for accepted EULA versions if this is a dedicated server 2023-10-21 19:16:52 +02:00
Kawe Mazidjatari
fa079bf5e4 These files are now located in the bin dir 2023-10-21 18:58:42 +02:00
Kawe Mazidjatari
5cd7a64c8d SDK cleaner script is now in the bin dir 2023-10-21 11:43:31 +02:00
Kawe Mazidjatari
b4f5c1961d Update SDK cleaner script 2023-10-21 11:37:54 +02:00
Kawe Mazidjatari
dedd83c84d Patch is no longer needed
This file has been moved over to the VPK, therefore, formatting will always be identical.
2023-10-21 11:30:01 +02:00
Kawe Mazidjatari
e99e1c40e0 Drop a warning when someone fails authentication 2023-10-21 11:24:51 +02:00
Kawe Mazidjatari
ab5c5a39e1 Spawn AI hints so the entire AI Network can be cached 2023-10-21 11:23:39 +02:00
Kawe Mazidjatari
a54c8eacd9 Rename VPK build scripts 2023-10-20 20:15:36 +02:00
Kawe Mazidjatari
1a1f00ce2f The dedicated server needs this as well 2023-10-20 19:39:18 +02:00
Kawe Mazidjatari
bbe163f58c Add comments on newly added code 2023-10-20 19:30:07 +02:00
Kawe Mazidjatari
234dc312fe EULA dialog implementation
Display the EULA (fetched from masterserver), which the end user MUST accept before they can make use of the multiplayer features of R5Reloaded. NOTE: user doesn't need to agree to this to use the listenserver.
2023-10-20 19:16:33 +02:00
Kawe Mazidjatari
0d442285ca CFG cleanup
Remove dev parameters from retail configs, disable net_usesocketsforloopback by default now. This was a leftover from before we got dedicated servers working, and was thus required to get other people to connect to the listen server. This is no longer needed, it was causing a problem with authentication on the local server as the input address from the client would differ from what the master server would bake into the JWT token (localhost translates into an actual ip address on the master server side).
2023-10-20 19:14:40 +02:00
Kawe Mazidjatari
9b3024a874 Don't query JWT token if we connect to localhost
Localhost in many cases implies usage of listen server; these don't require auth on loopback connections.
2023-10-20 19:12:42 +02:00
Kawe Mazidjatari
d80e60428d Only run ImGui code if we aren't quitting
Should fix a very rare crash where this still gets called while imgui has already been destroyed.
2023-10-20 19:11:12 +02:00
Kawe Mazidjatari
e7111bee18 Bump version to 009 2023-10-15 22:00:35 +02:00