Skip to content

Commit

Permalink
Last fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FireNameFN committed Nov 10, 2024
1 parent 4759bf0 commit e59ae24
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions Content.Client/_CorvaxNext/OfferItem/OfferItemSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ public override void Initialize()
Subs.CVar(_cfg, NextVars.OfferModeIndicatorsPointShow, OnShowOfferIndicatorsChanged, true);
}



public override void Shutdown()
{
_overlayManager.RemoveOverlay<OfferItemIndicatorsOverlay>();
Expand All @@ -33,21 +31,13 @@ public bool IsInOfferMode()
{
var entity = _playerManager.LocalEntity;

if (entity == null)
return false;

return IsInOfferMode(entity.Value);
return entity is not null && IsInOfferMode(entity.Value);
}

private void OnShowOfferIndicatorsChanged(bool isShow)
{
if (isShow)
{
_overlayManager.AddOverlay(new OfferItemIndicatorsOverlay(
_inputManager,
EntityManager,
_eye,
this));
}
_overlayManager.AddOverlay(new OfferItemIndicatorsOverlay(_inputManager, EntityManager, _eye, this));
else
_overlayManager.RemoveOverlay<OfferItemIndicatorsOverlay>();
}
Expand Down

0 comments on commit e59ae24

Please sign in to comment.