3574 Commits

Author SHA1 Message Date
Kawe Mazidjatari
02acb45037 Reset to default master server endpoint 2024-04-05 16:24:46 +02:00
Kawe Mazidjatari
dd85e2b6a1 Bugfix: don't print summaries of hidden cvars 2024-04-05 16:24:46 +02:00
Kawe Mazidjatari
909977452e 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.
2024-04-05 16:24:45 +02:00
Kawe Mazidjatari
f8fe90874a Only compile signature results in dev mode 2024-04-05 16:24:45 +02:00
Kawe Mazidjatari
bfea8023eb Reduce duplicate code
Make a method for setting the host state.
2024-04-05 16:24:45 +02:00
Kawe Mazidjatari
27493a25ae Make const
Const correctness.
2024-04-05 16:24:45 +02:00
Kawe Mazidjatari
5d9b9ec9d5 Fix CVE-2023-38546
Merge: curl/curl@61275672b4
2024-04-05 16:21:45 +02:00
Kawe Mazidjatari
6b246e0ce8 Netchan: comment out unused code 2024-04-05 16:21:45 +02:00
Kawe Mazidjatari
b3e768190c 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.
2024-04-05 16:21:45 +02:00
Kawe Mazidjatari
723052eb6f 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).
2024-04-05 16:21:45 +02:00
Kawe Mazidjatari
86ca562fb3 Constness 2024-04-05 16:21:45 +02:00
Kawe Mazidjatari
994658c4a2 Fixup hardcoded thirdparty directories in CMake files
Should be obtained from the 'THIRDPARTY_SOURCE_DIR' variable.
2024-04-05 16:21:45 +02:00
Kawe Mazidjatari
8bd1fa4c6e Fix JWT compile errors and warnings 2024-04-05 16:21:44 +02:00
Kawe Mazidjatari
dc011e5d99 Add MbedTLS library to SDK
Will be used for the JWS library, should eventually be replaced with SChannel.
2024-04-05 16:21:44 +02:00
Kawe Mazidjatari
cc3b91a3b6 WIP: add JWT library
Currently does not compile, pending integration into SDK.
2024-04-05 16:05:56 +02:00
Kawe Mazidjatari
3b81e9e589 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.
2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
22bbb173fa Make ICpuTopology methods virtual
Virtual in the engine we are working on; this should be virtual too.
2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
aa13725f15 Add table for affinity mask
Small usage table.
2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
c1c01d2302 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.
2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
f2058c9ecd Fix typo
Second statement should be checking on vecMaxBound.
2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
48256955af Null console commands past the 512th byte
A mistake has been made, certain area's of the engine actually do allow strings larger than 128 bytes, just one routine that doesn't (console commands). Tokenizer only tokenizes it up to 512 bytes, so null all the other bytes past this. This still fixes the flaw mentioned in the comment at the place where the nulling happens.
2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
7b7177240d Improve NavMesh render performance 2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
328fb75674 Should be a word pointer 2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
d6fd782601 Add new RPak types and rename existing
Rename to enforce consistency.
2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
7a07731457 Don't reinstall the entire game if an update was pushed with no updated files 2023-11-18 17:07:48 +01:00
Kawe Mazidjatari
dfc9f50176 Multiple bug fixes
The initial install, and all subsequent updates were always looking for prereleases. But the prerelease checks were also bugged so it grabbed the latest release. Now this has been fixed, the bug became apparent. Now defaulted to latest (non-prerelease). Also only toggle update view if the game is installed. Also added an error message if 'SDKLauncher_WriteLocalManifest()' fails
2023-11-01 01:44:21 +01:00
Kawe Mazidjatari
69c6de4638 Save settings before restart, and check the value afterwards
Must not be "", else keep the toggle disabled.
2023-10-29 23:17:56 +01:00
Kawe Mazidjatari
c87ee1b81d Fix launch after update bug
Build command line properly, must prepend executable name first since that gets populated into arg 0.
2023-10-29 23:16:58 +01:00
Kawe Mazidjatari
a7277b47fc Launcher UX Improvements
* Fix bug regarding searching for prerelease builds, prerelease was assumed to be always at the top but this isn't true.
* Make the prerelease toggle button check for updates instantly.
* Automatically launch the game after the update has finished.
2023-10-29 20:08:10 +01:00
Kawe Mazidjatari
633292a820 Add comprehensive error logging for downloads and fix CPU in progress callback
The game will now not be installed if the download fails (this should've never happened in the first place). The CPU usage fix should also fix download speed throttling.
2023-10-23 00:08:25 +02:00
Kawe Mazidjatari
47632d89fa Implement incremental patching
Only replace files that has changed from the previous depot, don't just copy and replace all the existing assets.
2023-10-22 22:15:13 +02:00
Kawe Mazidjatari
5ea9cd985a Swap greying out code
Only Advanced Options needs to be greyed out if no install is found, youtube should always work.
2023-10-22 01:54:43 +02:00
Kawe Mazidjatari
ac9d45b567 Fix SDK Launcher display bug
If depot vector is empty, the SDK launcher will download all files in depot json, but still use the depot vector as the count for how many packages instead of the depot json array.
2023-10-21 19:12:33 +02:00
Kawe Mazidjatari
ae098603bb Overall launcher cleanup and improvements
Use clean_sdk.bat to clean the SDK install.
2023-10-21 18:00:25 +02:00
Kawe Mazidjatari
f4df4e0fc0 Show actual to-install package count + WIP callback fix
Progress callback gets called too often eating CPU, work in progress fix added but not yet utilized.
2023-10-21 17:57:59 +02:00
Kawe Mazidjatari
cc3b17b342 Implement manifest based update logic
This checks the local manifest with that of the remote, and updates the game as necessary.
2023-10-15 21:37:45 +02:00
Kawe Mazidjatari
97dc1f646e Update SDK updater 2023-10-15 18:05:32 +02:00
Kawe Mazidjatari
156e31404e Light protobuf cmakelist cleanup
Add missing files and remove unused version file (version file was also incorrect, it mentions version 3.19 but we have 3.21.12).
2023-09-17 22:06:15 +02:00
Kawe Mazidjatari
7b5f40fb9d Upgrade spdlog library to 1.12.0 2023-09-17 20:37:44 +02:00
Kawe Mazidjatari
feffcdfa94 Light pluginsystem cleanup
Light cleanup and improvements. Always load plugin dll's from "GAME" first before searching through mods to prevent mods from overriding them.
2023-09-17 20:33:57 +02:00
Kawe Mazidjatari
5af364f325 Remove extraneous check
Should not fire this code if that cvar is set.
2023-09-17 17:19:32 +02:00
Kawe Mazidjatari
71d0332dca Add CCommonHostState to SDK
The previous 'interval_per_tick' global belongs to the 'g_pCommonHostState' singleton.
2023-09-17 16:44:18 +02:00
Kawe Mazidjatari
b723cb35cc Combine methods
Combine ClearAutoComplete with ResetAutoComplete, full reset needs to be performed when calling this. Combining avoids confusion and potential bugs later on.
2023-09-17 16:15:42 +02:00
Kawe Mazidjatari
970c04fa56 Improve suggest reset logic
* Fixed redundant call (every frame) to 'ResetAutoComplete()' if the list was empty while having text in the buffer.
* 'ResetAutoComplete()' also resets 'm_bCanAutoComplete' now.
2023-09-17 12:47:36 +02:00
Kawe Mazidjatari
0cc148e65c Improve position reset logic
Force scroll to 0 on xy when it should reset, setting rects to 0 isn't sufficient as it goes into minus. Made the code mode simple as well.
2023-09-17 12:06:38 +02:00
Kawe Mazidjatari
375ff7fb16 Clarify code
Use enums for default positions.
2023-09-17 11:38:00 +02:00
Kawe Mazidjatari
fc845d355f CConsole: Fix reset hack and optimize
Don't update the view once we already found the 'active' object, or if we are at the park position (-1). This fixes the hack of having to have CConsole::m_bSuggestMoved to be true all the time.
2023-09-17 01:37:01 +02:00
Kawe Mazidjatari
9aefd6a046 CConsole: reset the view to the top if the list was updated
If you had a list of suggestions, and had an active element halfway through the list, and then update the suggestion list again by changing what's in the input buffer, the view would remain at the old position (displaying whatever is there). This makes sure the view gets reset all the way to the top if the list was updated.
2023-09-17 01:25:44 +02:00
Kawe Mazidjatari
53d981a06d Fix incorrect address print
Printed the wrong pointer.
2023-09-16 22:34:21 +02:00
Kawe Mazidjatari
1323703251 Move process time rate limit back to caller hook
Move it back to caller hook instead of in the ProcessMessages function as there were crash reports when running the listen server. Moving this back solved the intermittent crash problem entirely while still rate limiting process time.
2023-09-16 22:03:39 +02:00