Correct actor-value virtual mappings#1
Draft
Quantumyilmaz wants to merge 2 commits into
Draft
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.
Summary
ActorValueOwner::ModActorValueoverloads dispatch to their documented runtime slots under MSVCActor::Unk_19D, the value-adjustment/clamping virtual used by the source-aware damage pathWhy the declaration order changes
CommonLibSF correctly labels the source-aware overload as slot
0x06and the no-source overload as slot0x07. MSVC emits same-name virtual overload declarations in reverse vtable order, however, so the former textual order compiled calls to the opposite entries. Keeping the declarations reversed makes normal C++ calls use the documented runtime slots.Actor virtual evidence
PlayerCharacter::VTABLE[32]/ ID 452459 is theActorValueOwnersubobject table at complete-object offset+0x700x06calls primary-table slot0x19DforkDamage, passing(const ActorValueInfo&, float)and consuming an adjustedfloatreturn valuePlayerCharacter::VTABLE[41]/ ID 452447 is the primary table; its0x19Doverride applies player/resource clamps and continues into the Actor implementation0x07is a no-source thunk that supplies a null source and dispatches slot0x06Validation
0x38/ slot0x07and source-aware calls byte offset0x30/ slot0x06Integration check
All four QTR draft branches cherry-pick together cleanly, and the combined tree passes full CommonLibSF MSVC debug and release builds.