Skip to content

Commit

Permalink
Implement stopping animation of getting detector
Browse files Browse the repository at this point in the history
Works on contacting with ladder
  • Loading branch information
ForserX committed Oct 25, 2023
1 parent 4b53d1a commit a2bc835
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/xrGame/CustomDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,24 @@ bool CCustomDetector::CheckCompatibility(CHudItem* itm)

void CCustomDetector::HideDetector(bool bFastMode)
{
if(GetState()==eIdle)
const CHUDState::EHudStates CurrentState = (CHUDState::EHudStates)GetState();
switch (CurrentState) {
case CHUDState::EHudStates::eIdle: {
ToggleDetector(bFastMode);
return;
}
case CHUDState::EHudStates::eShowing: {
bool bClimb = ((Actor()->MovingState() & mcClimb) != 0);
if (bClimb) {
StopCurrentAnimWithoutCallback();
SetState(eIdle);
ToggleDetector(bFastMode);
}
break;
}
default:
break;
}
}

void CCustomDetector::ShowDetector(bool bFastMode)
Expand Down

0 comments on commit a2bc835

Please sign in to comment.