Skip to content

Commit

Permalink
Possible fix for binoc perma zoom (#4176)
Browse files Browse the repository at this point in the history
# About the pull request

I have no consistent reproducibility for this but this may fix it? Seems
to occur when an explosion blows up the binocs in the hand of the person
while zoomed.


# Explain why it's good for the game

Bug bad

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog

:cl: Morrow
fix: Possible fix for binoc perma zoom
/:cl:
  • Loading branch information
morrowwolf authored Aug 23, 2023
1 parent 0827f83 commit d260ac0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,7 @@ cases. Override_icon_state should be a list.*/
UnregisterSignal(src, list(
COMSIG_ITEM_DROPPED,
COMSIG_ITEM_UNWIELD,
COMSIG_PARENT_QDELETING,
))
UnregisterSignal(user, COMSIG_MOB_MOVE_OR_LOOK)
//General reset in case anything goes wrong, the view will always reset to default unless zooming in.
Expand Down Expand Up @@ -861,6 +862,7 @@ cases. Override_icon_state should be a list.*/
RegisterSignal(src, list(
COMSIG_ITEM_DROPPED,
COMSIG_ITEM_UNWIELD,
COMSIG_PARENT_QDELETING,
), PROC_REF(unzoom_dropped_callback))
RegisterSignal(user, COMSIG_MOB_MOVE_OR_LOOK, PROC_REF(zoom_handle_mob_move_or_look))

Expand Down

0 comments on commit d260ac0

Please sign in to comment.