Repository navigation
Fix monster fallthrough in UNITS_CanAnimModeUseVelocityModifier - #242
Open
ResurrectedTrader wants to merge 1 commit into
Open
ResurrectedTrader wants to merge 1 commit into
ResurrectedTrader wants to merge 1 commit into
Conversation
The UNIT_MONSTER case selected the mode modulators and then fell through into "default: return FALSE", so no monster mode ever took UNITS_UpdateRunWalkAnimRateAndVelocity: walking and running monsters kept the default anim rate and their path velocity was never scaled. In 1.10f the check is inlined in UNITS_UpdateAnimRateAndVelocity (D2Common.0x6FDBF050). The monster branch picks the classic or expansion table (0x6FDBF41F-0x6FDBF44D) and goes on to test bCanUseVelocityModifier at 0x6FDBF459 without returning early. 1.14d is the same (Game.exe.0x6214A0). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
In
UNITS_CanAnimModeUseVelocityModifier, theUNIT_MONSTERcase picks the mode modulators and then falls through intodefault: return FALSE;. As a result no monster mode ever reachesUNITS_UpdateRunWalkAnimRateAndVelocity: walking and running monsters keep the default anim rate, and their path velocity is never scaled bySTAT_VELOCITYPERCENT/ faster run-walk.1.10f
Inlined in
UNITS_UpdateAnimRateAndVelocity(D2Common.0x6FDBF050, #10376). The monster branch does theMONSTATSFLAG_NPCwalk/run shortcut, then picks the classic or expansion table and moves on to the modulator tests without returning:1.14d
The same in
Game.exe0x6214A0:Change
Add the missing
break;.🤖 Generated with Claude Code