Repository navigation
Fix monster fallthrough in UNITS_CanAnimModeUseAttackRate - #243
Open
ResurrectedTrader wants to merge 1 commit into
Open
ResurrectedTrader wants to merge 1 commit into
ResurrectedTrader wants to merge 1 commit into
Conversation
Same missing break as UNITS_CanAnimModeUseVelocityModifier: the UNIT_MONSTER case fell through into "default: return FALSE", so monster attacks never ran at their attack rate. In 1.10f the check is inlined in UNITS_UpdateAnimRateAndVelocity (D2Common.0x6FDBF050). The monster branch picks the table at 0x6FDBF61C-0x6FDBF63B and tests bCanUseAttackRate at 0x6FDBF647. 1.14d is the same (Game.exe.0x6215BD). 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.
UNITS_CanAnimModeUseAttackRatehas the same missingbreakasUNITS_CanAnimModeUseVelocityModifier: theUNIT_MONSTERcase falls through intodefault: return FALSE;, so monster attacks never run at their attack rate (UNITS_UpdateAttackAnimRateAndVelocity).1.10f
Inlined in
UNITS_UpdateAnimRateAndVelocity(D2Common.0x6FDBF050, #10376). The velocity test above falls into this one (0x6FDBF3DE); the monster branch picks the table and goes on to thebCanUseAttackRatetest:1.14d
The same in
Game.exe0x621580:Change
Add the missing
break;.Once monsters reach the skill-attack-rate branch, they can hit the NULL used-skill dereference that is fixed separately in #244. The two should land together.
🤖 Generated with Claude Code