fix: restore manual aiming across z-levels#9788
Merged
Merged
Conversation
Fully remove never-set variable and checks for it that prevented manual z-level aiming. This was previously set based on the z-levels option, but that option was removed in cataclysmbn#9543 and the variable remained still checked (and thus could never be true). This seemed unintentional and broke manual aiming across z-levels.
chaosvolt
approved these changes
Jul 3, 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.
Purpose of change (The Why)
The ability to manually aim ranged weapons across z-levels with
>/<disappeared, seemingly unintentionally in #9543 .Describe the solution (The How)
Fully remove never-set variable
allow_zlevel_shiftand checks for it that prevented manual z-level aiming. This was previously set based on the z-levels option, but that option was removed in #9543 and the variable remained still checked (and thus could never be true). This seemed unintentional and broke manual aiming across z-levels.Describe alternatives you've considered
None
Testing
Verified ability to aim ranged weapons across z-levels again as it previously worked.
Additional context
There remains some jank with ranged weapons across z-levels out of the scope of this particular issue, such as being able to poke with reach melee weapons through the roof (made easy with clairvoyance but not required if you poke blindly); or the aiming indicator not making sense when the aim crosses z-levels. Separate issues with separate fixes :)
Checklist
Mandatory
closes #1234in Summary of the PR so it can be closed automatically.(n/a: Didn't find any)
Optional
n/a
Build Artifacts
PR build for commit 961a6d0 (Merge remote-tracking branch 'upstream/main' into pr/9788) on 2026-07-03 19:55:03