Add FiveM 3717/3757 compatibility layer and guarded native integration#13
Open
Lens931 wants to merge 1 commit into
Open
Add FiveM 3717/3757 compatibility layer and guarded native integration#13Lens931 wants to merge 1 commit into
Lens931 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
Memory::FiveMCompatwithClientBuilddetection for3717/3757, per-buildNativeOffsetsprofiles, and detailed startup logs viaLogCompatibilityStatus(); seeChaosMod/Memory/FiveMCompat.*and docsdocs/fivem_3717_3757_build.json.NativeCompat(inMain.cpp) and replaced direct calls toWAIT,IS_SCREEN_FADED_OUT,DO_SCREEN_FADE_IN, andSET_ENTITY_HEALTHwith wrappers that consultFiveMCompatprofiles and support a guarded 2-argSET_ENTITY_HEALTHvariant via#if defined(CHAOS_FIVEM_SET_ENTITY_HEALTH_2ARGS).Memory::GetGlobalPtrrouting to consultFiveMCompat::IsFiveM()/DetectClientBuild()and emit build-specific logs while keeping a conservative fallback to SHV where required; added#include "Memory/FiveMCompat.h"where needed.dllmain.cpp(CanRegisterWithCurrentLoader) to log/guardscriptRegister/ASI registration on FiveM hosts and documented loader limitations.CHAOS_DISABLE_INCOMPATIBLE_FIVEM_HOOKSto skip therage::scrThread::Runhook on unsupported FiveM builds and inserted checks inMemory/Hooks/ScriptThreadRunHook.cpp.docs/fivem_3717_3757_build.jsonand added a short README section explaining limitations and expected logs.Testing
rg) to confirmFiveMCompat,NativeCompatwrappers, build guards, and compatibility logs were added and referenced (succeeded).cmake -S ChaosMod -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo, which failed because the environment CMake is3.28.3while the project requires3.31+(configuration failed).docs/fivem_3717_3757_build.jsonand README section are present and the compatibility log strings exist (succeeded).Codex Task