Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(port): allow blind throw while peeking upstairs/downstairs #4218

Merged
merged 3 commits into from
Feb 11, 2024

Conversation

End3r991
Copy link
Contributor

@End3r991 End3r991 commented Feb 11, 2024

Purpose of change

Allow throw while peeking downstair/upstairs. Port of #49014 from DDA

Describe the solution

Remove look_around() handling in game::peek() when there is a z-lvl move, and let game::peek( const tripoint &p ) handle this.

Describe alternatives you've considered

Merging game::peek() and game::peek( const tripoint &p )

Testing

Additional context

Source PR: throw while peeking up/down stairs, by @Zeropol: CleverRaven/Cataclysm-DDA#49014

Checklist

@github-actions github-actions bot added the src changes related to source code. label Feb 11, 2024
End3r991 and others added 2 commits February 10, 2024 18:47
Co-Authored-By: Zeropol <28099824+zeropol@users.noreply.github.com>
@chaosvolt
Copy link
Member

chaosvolt commented Feb 11, 2024

And amended the commit. It still shows as a separate thing but weh.

Copy link
Member

@chaosvolt chaosvolt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Compiled and load-tested.
  2. Tested peeking around corners both on surface level and below-ground, works normally as does throwing items around them.
  3. Tested peeking and throwing up and down stairs, rock thrown where it's supposed to go.

Tested above both with and without 3D vision enabled.

Interesting bit of jank: it defaults to targetting things seen from your ORIGINAL position and not the position you're peeking into. I can't tab to this debug monster for example, but can throw if I manually select it. Happens both with and without 3D vision on:
image

Oddly, throwing up/down stairs works fine:
image

However, it still won't select NPCs correctly like this, only monsters. If I add a second debug monster I can tab between them but not the NPC.

I tested in build 2024-02-07 and the same-z-level weirdness is already present, with and without 3D vision on.

@scarf005 scarf005 merged commit 06ac1c7 into cataclysmbnteam:main Feb 11, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants