Remove useless resolves from a buncha tests.

This commit is contained in:
Vera Aguilera Puerto
2021-12-08 12:43:38 +01:00
parent 32416334c4
commit 2699540526
30 changed files with 189 additions and 184 deletions

View File

@@ -33,9 +33,10 @@ namespace Content.Client.Rotation
private void SetRotation(AppearanceComponent component, Angle rotation)
{
var sprite = IoCManager.Resolve<IEntityManager>().GetComponent<ISpriteComponent>(component.Owner);
var entMan = IoCManager.Resolve<IEntityManager>();
var sprite = entMan.GetComponent<ISpriteComponent>(component.Owner);
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(sprite.Owner, out AnimationPlayerComponent? animation))
if (!entMan.TryGetComponent(sprite.Owner, out AnimationPlayerComponent? animation))
{
sprite.Rotation = rotation;
return;