Repository navigation
Lay a player's collision footprint by pattern - #247
Open
ResurrectedTrader wants to merge 1 commit into
Open
ResurrectedTrader wants to merge 1 commit into
ResurrectedTrader wants to merge 1 commit into
Conversation
PATH_AddCollisionFootprintForUnit used the collision pattern for monsters only and sent players to COLLISION_SetMaskWithSize, which stamps the size mask without the pattern's COLLIDE_NO_PATH centre. PATH_RemoveCollisionFootprintForUnit already removes players by pattern. 1.10f (D2Common.0x6FDA8320, #10222) branches on "type <= 1" at 0x6FDA833A and calls COLLISION_SetMaskWithPattern (#10130) with pDynamicPath->dwCollisionPattern for players and monsters alike. 1.14d is the same (Game.exe.0x64941B). 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.
PATH_AddCollisionFootprintForUnit(#10222) lays the collision pattern (COLLISION_SetMaskWithPattern) for monsters only. Players fall to the default branch,COLLISION_SetMaskWithSize, which stamps the size mask without the pattern'sCOLLIDE_NO_PATHcentre.PATH_RemoveCollisionFootprintForUnit(#10223) already removes players by pattern, so adding and removing a player's footprint don't match.1.10f
The whole of
D2Common.0x6FDA8320(#10222). Unit types 0 and 1 share the pattern branch, which passespDynamicPath->dwCollisionPattern(+0x48) to #10130. Objects get #10129 and everything else #10128:1.14d
The same in
PATH_AddUnitCollision(Game.exe0x649400):A live 1.14d client's collision map shows the result: the player's own subtile holds
0x1080(COLLIDE_PLAYER | COLLIDE_NO_PATH). MOO produces0x80there.Change
case UNIT_PLAYER:shares theUNIT_MONSTERbranch. Not version-gated, since 1.10f and 1.14d agree.🤖 Generated with Claude Code