[Bugfix] Fix Missile obstruction checks#8351
Merged
StephenCWills merged 2 commits intodiasurgical:masterfrom Jan 31, 2026
Merged
[Bugfix] Fix Missile obstruction checks#8351StephenCWills merged 2 commits intodiasurgical:masterfrom
StephenCWills merged 2 commits intodiasurgical:masterfrom
Conversation
strich
approved these changes
Jan 29, 2026
Collaborator
strich
left a comment
There was a problem hiding this comment.
Code changes look good to me. It is unclear yet if this fully resolves the linked bug, though it is mentioned more work needs to be done after this as well in the OP post.
StephenCWills
previously approved these changes
Jan 31, 2026
StephenCWills
approved these changes
Jan 31, 2026
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.
Fixes: #6693
LineClearMissile()Monsters ask:
"Can I shoot the player?"
LineClear(PosOkMissile, start, end)PosOkMissile(tile)= true if the tile is notBlockMissile.CheckMissileCol()Missiles ask:
"Can I move through this tile?"
!IsMissileBlockedByTile(tile)BlockMissile_oMissFlag== falseTo remedy this, this PR adds a variant function called
LineClearMovingMissile(), which is exclusively used when we need to check if a missile would be able to make it between 2 points without hitting an obstruction according toCheckMissileCol().LineClearMissile()continues to be used for missiles that do not need to travel, such as Leoric summoning a minion at a position, or the player casting a Guardian at a position.This fix has edge cases due to differing logic between
LineClear()and how a missile moves along a path withMoveMissile(). This is the 2nd of the 4 needed fixes for the the problems with ranged monsters/ranged spells (like Guardian), and the 1st already has been merged back in 2023.1. Missile Space Distortion fix2. Same checks for missile path success and confirming missile path has no obstructions (This PR)
3. Same logic for missile path and confirming missile path has no obstructions
4. Ranged monster AI tweaks to prevent standing still with no valid line of sight for missiles