Regression was caused in commit 3bb4ee625863c1dd503f07e0d480f4b3fd302c48. The new sound engine has breaking changes in its exports. Added shim layer to fix incompatibilities on the export 'MilesSampleSetSourceRaw'.
The new scripts now show a dedicated FPS limit option in the video settings, there is also a demand for having this cvar to persist its value. Marked as FCVAR_ARCHIVE so it gets saved to user profile settings.
The field 'void* unk0' is actually 'CNetMessage::m_pMessageHandler'. Since this type was taken from the IDB (in which this field is actually part of the netmessage implementation itself, since SVC messages use a different vtable and its the only way to have it show correctly in the output), an extra 8 bytes shift occurred rendering the system defective. Removed the field and the structure now matches that of the game executable.
Internal structure 'IntProjectData_t' has changed, padding size adjusted to accommodate changes.
Sound engine taken from retail build R5pc_r5-61_J318_CL651503_2020_10_14_18_51.
- Member CPlayer::m_lastUCmdSimulationRemainderTime is set and checked as an int in compiled code, change type from float to int.
- Simulation time was calculated incorrectly; brough expression 'CPlayer::m_lastUCmdSimulationRemainderTime * TICK_INTERVAL' into parentheses.
- Call to CPlayer::SetTotalExtraClientCmdTimeAttempted() took incorrect parameter value if flSimulationTime < 0.0f, it was supposed to be clamped to 0.0f, but instead, took the value of 'TIME_TO_TICKS( flTimeBase )'.
Unbind the game from the platform system, which is useful when developing for or debugging the game. This was supposed to make it into the SDK back in 2021, but wasn't due to the ability to spoof usernames. This is no longer possible on servers requiring authentication as the player's name is actually checked along with the Nucleus ID.
The flags were originally removed in commit 1bdc3b893e59f208dbeadd78b978096dcdd8e8f9, but this caused a regression in the dev menu. Restored flags (this also doesn't cause security issues as these commands are flagged devonly and cheats anyways).
The code originally fetches available and selected languages from Origin/EADesktop. The issue however is that its hard to change the language through the Origin/EADesktop app. The second issue is that the languages returned by Origin/EADesktop isn't necvesarily supported by our version of the game, for example, the original implementation of EbisuSDK_GetLanguage() also returns ar_SA, which is supported by the retail version of the game, but our version doesn't have the code to render this language. The code has been rewritten to allow the user to easily change the language using the command line '-language' parameter. The miles code has also been slightly adjusted to fetch the language directly from HEbisuSDK_GetLanguage() instead of miles_language since otherwise we would still error out in engine code as miles_language will be out of sync.
Disabled additional unnecessary DX code from patched dedicated server executable, this allows the dedicated server to run RPaks containing models without any material or texture data. This also allows us to fully rebuild all RPaks for dedicated while also omitting material/texture data to further reduce memory usage during the parsing thereof, and overall disk size.
Unclamped CBitRead::ReadBits() call on stack buffer of MAX_USER_MSG_DATA bytes. Function has been rebuilt with additional clamping to mitigate the problem.
Parameter 'nBytes' was unused while it should've been, causing invalid buffer sizes being set. Bug was found after careful inspection of generation assembly code.
- Fixed stack smash in CClient:ProcessVoiceData (oob read on bitbuf).
- Fixed stack smash in CClient:ProcessDurangoVoiceData (oob read on bitbuf).
- Fixed ability to bypass team check on Durango voice packets if forced as reliable from the sender (client).
- Incorporated the following missing checks in the durango version of voice broadcasting:
- Enforce chat between multiple teams using cvar 'sv_alltalk'.
- Ability to also disable Durango voice data with cvar 'sv_voiceenable'.
- Ability to echo voice with Durango voice data using cvar 'sv_voiceEcho'.
2 new maps added, which will be includes in the next release. The dedi could still be used to build the vpk's, but ReVPK is prefered. Removed old build scripts.
Enforce 'MILES_DEFAULT_LANGUAGE' as the default rather than "english", even though "english" will always be the default. Also marked cvar 'miles_debug' as FCVAR_DEVELOPMENTONLY.
These warnings can get verbose, especially if events from the map itself are missing. Put behind a cvar and enabled it by default in development configurations.
- Reload map list each time the combo box is opened (needs to refresh if user installed a new map while launcher is still open).
- Reload playlists each time the combo box is opened (makes sure that the list is up-to-date if user modified it in any way).
- Use global VPK dir regex to parse out map names.
Netcon is no longer 32bits. Previously it was made 32bits to maximize system compatibility, but this was unfortunately too hard to maintain after the migration to CMake, it was also no longer worth it as the tool never got used on 32bit platforms. Renamed to avoid confusion.
The launcher would regularly throw the PSA (Program Compatibility Assistance) notification upon exit. Running the program with address sanitizer revealed 'CSurface::GetControlValue()' returned a pointer to a temporary buffer, this is destroyed as 'Forms::Control::Text()' returns class String by value. 'CSurface::GetControlValue()' is no longer necessary since we moved to the official KeyValues class, so this function has been removed all together and the issue has therefore been fixed.
Code actually doesn't need to be ran in the server frame thread. All the code really does is preparation work. Run it in the main thread but do join the server frame thread (FCVAR_SERVER_FRAME_THREAD) as we can't do concurrent work on the server VM.
Previously we did sq_pushroottable() and a subsequent sq_call() after compiling the text buffer, but this didn't work for code that was threaded, or using Get/SetNetVar* functions.
The second issue was that the callback for the "script" command was ran in the main thread. Server script should always run in the server frame thread, the Set/GetNetVar* functions check thread id to retrieve the correct VM context, so running server script from the main thread ended up with Set/GetNetVar* functions retrieving the client VM context rather than server's, causing undefined behavior.
Script commands are now queued to the server frame thread, ultimately fixing this bug.
Also fixed a small bug with function 'sq_compilebuffer()'; it takes an extra argument but this wasn't taken into account in the SDK.