1554 Commits

Author SHA1 Message Date
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
Kawe Mazidjatari
f3f042ae63 Add configurable server cvars for auth system
The command execute is now guarded off on the client with the cvar 'sv_allowClientSideCfgExec' instead of 'sv_cheats'.
2023-10-15 16:30:29 +02:00
Kawe Mazidjatari
9145faafd5 Bump sigcache version to 2.8 and rename methods
Bump version and rename CSigCache::LoadCache to CSigCache::ReacCache.
2023-10-15 16:29:26 +02:00
Kawe Mazidjatari
6709fcb058 R5Reloaded 2.3 emblem 2023-10-15 16:28:30 +02:00
Kawe Mazidjatari
b9a24b30af Change JSON field types send to master server
They were all strings; changed them to what made most sense for each field type. Changes:
"hidden": string -> bool
"port": string -> int
"checksum": string -> uint
"playerCount": string -> int
"maxPlayers": string -> int
2023-10-15 10:47:19 +02:00
Kawe Mazidjatari
879e187118 Reset to default master server endpoint 2023-10-15 10:45:36 +02:00
Kawe Mazidjatari
f5eb2a2e08 Bugfix: don't print summaries of hidden cvars 2023-10-15 10:41:17 +02:00
Kawe Mazidjatari
59fab7ac93 Client token authentication implementation
The game internally obtains a auth token from Origin. On connect to a gameserver, it will send it to the masterserver. The master server will create a JWT token and send this back to the client. The client stores this token in 3 userinfo cvars (token, sig1, sig2). the sig1 and sig2 cvars are there to compensate for the truncation caused by sending the cvar, as each cvar string length could be up to 255 (byte max). The server verifies this token (the signature, timestamp, expiry); if they are valid, the has successfully authenticated and will connect.
2023-10-15 10:40:46 +02:00
Kawe Mazidjatari
6b344ad52f Only compile signature results in dev mode 2023-10-15 10:32:35 +02:00
Kawe Mazidjatari
0eddec2473 Reduce duplicate code
Make a method for setting the host state.
2023-10-12 17:07:35 +02:00
Kawe Mazidjatari
fe5099eb04 Make const
Const correctness.
2023-10-12 17:06:51 +02:00
Kawe Mazidjatari
c1bf0cb4f9 Fix CVE-2023-38546
Merge: curl/curl@61275672b4
2023-10-12 17:05:12 +02:00
Kawe Mazidjatari
1783df407b Make JWT C again
Return to C since we don't need to replace the JasmineJSON library to the RapidJSON one, as the signature gets verified first before any JSON is getting parsed. JasmineJSON also appears to only have problems when compiled in the STRICT and/or LINK mode, which we aren't doing.
2023-10-12 17:03:12 +02:00
Kawe Mazidjatari
d83270a541 Netchan: comment out unused code 2023-10-08 16:37:35 +02:00
Kawe Mazidjatari
c3e11b4283 Pylon: fix use after free
The member must contain a copy of the string, pointing it to the buffer used by the language cvar results in undefined behavior. Several cases were the string pointed to random data were reported.
2023-10-08 16:37:10 +02:00
Kawe Mazidjatari
ab1d28c778 Improve CPU detection code
Structure now fully aligns with that of the engine, with exception of newly added fields for the SDK (new fields are marked in the structure definition).
2023-10-08 16:27:10 +02:00
Kawe Mazidjatari
ffedb41705 Constness 2023-10-08 15:52:16 +02:00
Kawe Mazidjatari
869aff3ce2 Fixup hardcoded thirdparty directories in CMake files
Should be obtained from the 'THIRDPARTY_SOURCE_DIR' variable.
2023-10-07 16:26:56 +02:00
Kawe Mazidjatari
858cbaa9a2 Make JWT code C++ compatible
Must be C++ as we will be replacing jasmin json with rapidjson.
2023-10-07 16:25:58 +02:00
Kawe Mazidjatari
591b202808 Rename to .cpp (unfinished)
JWT code will feature c++ code (jasmin json library will be replaced with rapidjson).
2023-10-07 16:23:31 +02:00
Kawe Mazidjatari
946422a91b Add MbedTLS library to SDK
Will be used for the JWS library, should eventually be replaced with SChannel.
2023-10-07 16:21:54 +02:00
Kawe Mazidjatari
3c868190d9 WIP: add JWT library
Currently does not compile, pending integration into SDK.
2023-10-07 11:19:05 +02:00
Kawe Mazidjatari
7348b859d2 Pak load code refactor and improvements
Make pak code more consistent.
* Added 'Pak_CloseFile' to SDK.
* Added partial rebuild of 'Pak_ProcessPakFile' to SDK.
* Added compile time assert for 'PakFileHeader_t' structure.
2023-10-06 21:43:41 +02:00
Kawe Mazidjatari
d2495be72a Make ICpuTopology methods virtual
Virtual in the engine we are working on; this should be virtual too.
2023-10-06 21:29:46 +02:00
Kawe Mazidjatari
7157a95350 Add table for affinity mask
Small usage table.
2023-10-06 21:28:57 +02:00
Kawe Mazidjatari
7806cceb33 Swap SSE4.1 instruction with an SSE2 instruction
The min spec is SSSE3, using SSE4.1 instructions (_mm_extract_epi64) will break compatibility. The code containing the defect is debug only, and %90+ of the user base uses an SSE4.1 capable processor.
2023-09-23 16:34:37 +02:00
Kawe Mazidjatari
4bc4b6f092 Fix typo
Second statement should be checking on vecMaxBound.
2023-09-23 14:55:23 +02:00