3201 Commits

Author SHA1 Message Date
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
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).
v2.3_rc4 v2.3_rc0 v2.4_rc4 v2.4_rc3 v2.4_rc2 v2.4_rc1 v2.4_rc0 v2.3_rc9 v2.3_rc8 v2.3_rc7 v2.2_rc11 v2.3_rc6 v2.3_rc2 v2.3_rc3 v2.2_rc12 v2.3_rc1 v2.4_rc5 v2.3_rc5
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
Kawe Mazidjatari
228b9222b3 Fix compiler error
Define this out for client dll.
2023-09-16 22:02:04 +02:00
Kawe Mazidjatari
57feab706c Add NVIDIA NvAPI legal notice
Should be in the thirdpartylegalnotices.txt we ship with builds.
2023-09-16 17:45:38 +02:00
Kawe Mazidjatari
00e79268d7 Fix infinite memalloc exploit in NET_SetConVar
Reported by Wanderer. Don't allow the creation of new ConVar entries in CClient::m_ConVars after the initial creation.
2023-09-16 16:18:18 +02:00
Kawe Mazidjatari
ee3560e722 Reimplement 'KeyValues::FindKey(...)'
Reimplement.
2023-09-16 16:13:14 +02:00
Kawe Mazidjatari
66daec04db Fix compile errors in non cert builds 2023-09-16 13:10:12 +02:00
Kawe Mazidjatari
c9637196b8 Improve CEngineAPI signatures 2023-09-16 13:09:22 +02:00
Kawe Mazidjatari
140270f426 Fix infinite recursion
Bug introduced in recent commit 1d41b23a.
2023-09-16 13:08:56 +02:00
Kawe Mazidjatari
5bab1bc6af Move CClient pointer adjuster to separate function
All process methods have a shifted CClient pointer, so this will be used more often.
2023-09-16 12:18:32 +02:00
Kawe Mazidjatari
1d41b23abb Make sure language is never NULL
* Initialize CPylon::m_Language to "english".
* Make sure cvar change callback is always setting values instead of returning out early.
2023-09-16 00:45:11 +02:00
Amos
0634261c18 Move global language constants to single file
Deduplicate.
2023-09-15 18:25:31 +02:00
Amos
95cd34eb23 Replace hardcoded sleep threshold constant
Replaced with a cvar.
2023-09-14 09:17:03 +02:00
Kawe Mazidjatari
1874443425 Disable NVIDIA Reflex Boost by default
Default the implementation to On, as per the documentation.
2023-09-14 00:02:37 +02:00
Kawe Mazidjatari
cdf03d8df7 Add UI settings cvar for NVIDIA Reflex
Required for settings scripts to work.
2023-09-14 00:01:33 +02:00
Kawe Mazidjatari
75e585ddeb
Merge pull request #112 from Mauler125/nvidia_reflex_timing
Nvidia reflex timing
2023-09-13 22:41:35 +02:00
Kawe Mazidjatari
eaa5347fa3 Only run NVIDIA Reflex if the display driver vendor is NVIDIA
This is to ensure we don't cause any performance hits when running the game on an AMD or Intel GPU.
2023-09-13 22:24:59 +02:00
Kawe Mazidjatari
a639a4befd Add 'CMaterialDeviceMgr' singleton to SDK
Manager class for display adapters.
2023-09-13 22:22:25 +02:00