Skip to content

Commit

Permalink
[Bugfix] Detector holds active state after it was dropped
Browse files Browse the repository at this point in the history
Steps to reproduce:
1) Take detector into your hands
2) Go to ruck, drop detector from your inventory
3) Close inventory and take dropped detector back.
4) 1st attempt to activate it would be unsuccessful. Hiding sound will be played, but detector won't be shown.

Reason - state has not "hidden" value when you drops detector.
  • Loading branch information
gunslingermod authored and Xottab-DUTY committed Aug 14, 2017
1 parent 705040f commit cc83e24
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/xrGame/CustomDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,13 @@ void CCustomDetector::OnH_B_Independent(bool just_before_destroy)
inherited::OnH_B_Independent(just_before_destroy);

m_artefacts.clear();

if (GetState() != eHidden)
{
// Detaching hud item and animation stop in OnH_A_Independent
TurnDetectorInternal(false);
SwitchState(eHidden);
}
}

void CCustomDetector::OnMoveToRuck(const SInvItemPlace& prev)
Expand Down

0 comments on commit cc83e24

Please sign in to comment.