Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Spatison committed Aug 22, 2024
1 parent 0eb64fb commit e6791b1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Content.Shared/_White/Telescope/SharedTelescopeSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@ private void OnUnequip(Entity<TelescopeComponent> ent, ref GotUnequippedHandEven
if (TryComp<HandsComponent>(ent, out var hands) &&
hands.ActiveHandEntity.HasValue &&
TryComp<TelescopeComponent>(hands.ActiveHandEntity, out var handTelescope))
{
telescope = handTelescope;
}
else if (TryComp<TelescopeComponent>(ent, out var entityTelescope))
{
telescope = entityTelescope;
}

return telescope;
}
Expand Down Expand Up @@ -90,7 +94,9 @@ private void SetOffset(Entity<EyeComponent> ent, Vector2 offset, TelescopeCompon
_eye.SetOffset(ent, offset + recoil.CurrentKick, ent);
}
else
{
_eye.SetOffset(ent, offset, ent);
}
}

public void SetParameters(Entity<TelescopeComponent> ent, float? divisor = null, float? lerpAmount = null)
Expand Down

0 comments on commit e6791b1

Please sign in to comment.