Repository navigation
Handle a unit with no used skill in UNITS_CanAnimModeUseAttackRate - #244
Open
ResurrectedTrader wants to merge 1 commit into
Open
ResurrectedTrader wants to merge 1 commit into
ResurrectedTrader wants to merge 1 commit into
Conversation
For a mode with bCanUseSkillAttackRate, UNITS_GetUsedSkill() was dereferenced without a NULL check. The game checks it and treats a missing skill as "no attack rate". 1.10f, inlined in UNITS_UpdateAnimRateAndVelocity (D2Common.0x6FDBF050): sub_6FDAFF30 (used skill) at 0x6FDBF65F, then "test eax, eax / jz" at 0x6FDBF664 skips to the default-rate path. 1.14d: Game.exe.0x621603. 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.
For a mode with
bCanUseSkillAttackRate,UNITS_CanAnimModeUseAttackRatedereferencesUNITS_GetUsedSkill(pUnit)without checking it. The game checks for NULL and treats a missing skill as "no attack rate", which falls back to the default rate.Players can already reach it, and monsters can too once the missing
breakin the same function is fixed (#243).1.10f
Inlined in
UNITS_UpdateAnimRateAndVelocity(D2Common.0x6FDBF050, #10376):1.14d
Game.exe0x621580:Change
Return
FALSEwhenUNITS_GetUsedSkillreturns NULL.🤖 Generated with Claude Code