Skip to content

Commit

Permalink
Fix IndicatorsShown() method (Сквош)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shtrecker committed Mar 4, 2025
1 parent bafb1aa commit 9680945
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/xrGame/level_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1061,19 +1061,34 @@ bool IndicatorsShown()
if (actor == nullptr)
return false;

if (actor->inventory().ActiveItem() == nullptr)
{
return false;
}

auto wpn = actor->inventory().ActiveItem()->cast_weapon();
if (wpn == nullptr)
{
return true;
}

if (wpn->IsUIForceHiding())
{
return false;
}
else if (wpn->IsUIForceUnhiding())
{
return true;
}
else if (wpn->IsGrenadeMode())
{
return true;
}

if (wpn->IsZoomed() && (wpn->get_ScopeStatus() == 1 || (wpn->get_ScopeStatus() == 2 && wpn->IsScopeAttached())))
{
return false;
}

return true;
}
Expand Down

0 comments on commit 9680945

Please sign in to comment.