diff --git a/Content.Client/Eye/EyeLerpingSystem.cs b/Content.Client/Eye/EyeLerpingSystem.cs index c0a7c016966..89719653d34 100644 --- a/Content.Client/Eye/EyeLerpingSystem.cs +++ b/Content.Client/Eye/EyeLerpingSystem.cs @@ -36,6 +36,9 @@ public sealed class EyeLerpingSystem : EntitySystem UpdatesAfter.Add(typeof(TransformSystem)); UpdatesAfter.Add(typeof(Robust.Client.Physics.PhysicsSystem)); UpdatesBefore.Add(typeof(SharedEyeSystem)); + // ES START + UpdatesBefore.Add(typeof(EyeSystem)); + // ES END UpdatesOutsidePrediction = true; } @@ -68,6 +71,11 @@ public sealed class EyeLerpingSystem : EntitySystem { _eye.SetRotation(uid, lerpInfo.TargetRotation, component); _eye.SetZoom(uid, lerpInfo.TargetZoom, component); + + // Starlight begin - fix ES Screenshake triggering on spawn + if (TryComp(uid, out var contentEye)) + contentEye.BaseRotation = lerpInfo.TargetRotation; + // Starlight end } } @@ -175,9 +183,15 @@ public sealed class EyeLerpingSystem : EntitySystem { var tickFraction = (float) _gameTiming.TickFraction / ushort.MaxValue; const double lerpMinimum = 0.00001; - var query = AllEntityQuery(); + // ES START + // add contenteye bc we only want to modify the fuckin base rotation + var query = AllEntityQuery(); + // ES END - while (query.MoveNext(out var entity, out var lerpInfo, out var eye, out var xform)) + // ES START + // contenteye + while (query.MoveNext(out var entity, out var lerpInfo, out var eye, out var contentEye, out var xform)) + // ES END { // Handle zoom var zoomDiff = Vector2.Lerp(lerpInfo.LastZoom, lerpInfo.TargetZoom, tickFraction); @@ -191,6 +205,14 @@ public sealed class EyeLerpingSystem : EntitySystem _eye.SetZoom(entity, zoomDiff, eye); } + // ES START + // UHHHHHHHHHHHh + // shit is fucked idk + // we need to alter baserotation not regular eye rotation and also i added baserotation because uhh + // there was no good way to separate 'how the eye should be oriented because of the grid/turning/etc' and 'the eye rotating on top of that' + // had to add it + // ES END + // Handle Rotation TryComp(entity, out var mover); @@ -199,7 +221,10 @@ public sealed class EyeLerpingSystem : EntitySystem if (!NeedsLerp(mover)) { - _eye.SetRotation(entity, lerpInfo.TargetRotation, eye); + // ES START + // contenteye + contentEye.BaseRotation = lerpInfo.TargetRotation; + // ES END continue; } @@ -207,11 +232,17 @@ public sealed class EyeLerpingSystem : EntitySystem if (Math.Abs(shortest.Theta) < lerpMinimum) { - _eye.SetRotation(entity, lerpInfo.TargetRotation, eye); + // ES START + // contenteye + contentEye.BaseRotation = lerpInfo.TargetRotation; + // ES END continue; } - _eye.SetRotation(entity, shortest * tickFraction + lerpInfo.LastRotation, eye); + // ES START + // contenteye + contentEye.BaseRotation = shortest * tickFraction + lerpInfo.LastRotation; + // ES END } } } diff --git a/Content.Client/Movement/Systems/ContentEyeSystem.cs b/Content.Client/Movement/Systems/ContentEyeSystem.cs index a332d25f9a1..b03fe537e1e 100644 --- a/Content.Client/Movement/Systems/ContentEyeSystem.cs +++ b/Content.Client/Movement/Systems/ContentEyeSystem.cs @@ -60,6 +60,9 @@ public sealed class ContentEyeSystem : SharedContentEyeSystem while (eyeEntities.MoveNext(out var entity, out ContentEyeComponent? contentComponent, out EyeComponent? eyeComponent)) { UpdateEyeOffset((entity, eyeComponent)); + // ES START + UpdateEyeRotation((entity, eyeComponent)); + // ES END } } @@ -71,6 +74,9 @@ public sealed class ContentEyeSystem : SharedContentEyeSystem while (eyeEntities.MoveNext(out var entity, out ContentEyeComponent? contentComponent, out EyeComponent? eyeComponent)) { UpdateEyeOffset((entity, eyeComponent)); + // ES START + UpdateEyeRotation((entity, eyeComponent)); + // ES END } } } diff --git a/Content.Client/Options/UI/Tabs/AccessibilityTab.xaml b/Content.Client/Options/UI/Tabs/AccessibilityTab.xaml index 41fac83c598..b617ba03491 100644 --- a/Content.Client/Options/UI/Tabs/AccessibilityTab.xaml +++ b/Content.Client/Options/UI/Tabs/AccessibilityTab.xaml @@ -7,6 +7,7 @@