Skip to content

Commit

Permalink
Fix sniper scope switch-out bug
Browse files Browse the repository at this point in the history
  • Loading branch information
timmybo5 committed Sep 13, 2023
1 parent 74dfb0d commit e699130
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/swb_base/WeaponBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public override void ActiveEnd(Entity ent, bool dropped)
{
// Attachments
HandleAttachments(false);
wasZooming = false;

base.ActiveEnd(ent, dropped);
}
Expand Down
6 changes: 6 additions & 0 deletions code/swb_base/attachments/BodyGroupSight.HunterScope2D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ public class HunterScope2D : BodyGroupSight
"100% accurate while scoped in"
};

public override void OnUnequip(WeaponBase weapon)
{
base.OnUnequip(weapon);
OnZoomEnd(weapon);
}

public override void OnZoomStart(WeaponBase weapon)
{
WeaponBaseSniper.OnScopeStart(weapon, ZoomInSound, ZoomInDelay);
Expand Down

0 comments on commit e699130

Please sign in to comment.