Camera doesn't move on melee attack (#2107)

This commit is contained in:
Swept
2020-11-03 21:30:36 +00:00
committed by GitHub
parent 246b2fe6db
commit 6a72a0365d

View File

@@ -1,4 +1,4 @@
using Robust.Client.GameObjects;
using Robust.Client.GameObjects;
using Robust.Client.Interfaces.GameObjects.Components;
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
@@ -39,15 +39,6 @@ namespace Content.Client.GameObjects.Components.Mobs
offset *= (ResetTime - _time) / ResetTime;
}
if (Owner.TryGetComponent(out CameraRecoilComponent recoilComponent))
{
recoilComponent.BaseOffset = offset;
}
else if (Owner.TryGetComponent(out EyeComponent eyeComponent))
{
eyeComponent.Offset = offset;
}
if (Owner.TryGetComponent(out ISpriteComponent spriteComponent))
{
// We have to account for rotation so the offset still checks out.