From e6dd47ea460daab61a0e2b83bbef412c7025fbc8 Mon Sep 17 00:00:00 2001 From: themias <89101928+themias@users.noreply.github.com> Date: Thu, 11 May 2023 07:20:41 -0400 Subject: [PATCH] Fix dead mob sprites rotating on death (#16317) --- Content.Client/Buckle/BuckleSystem.cs | 2 +- .../Rotation/RotationVisualsComponent.cs | 8 ++++++-- .../Prototypes/Entities/Mobs/NPCs/simplemob.yml | 2 ++ .../Aliens/slimes.rsi/blue_adult_slime_dead.png | Bin 475 -> 490 bytes .../slimes.rsi/green_adult_slime_dead.png | Bin 465 -> 484 bytes .../slimes.rsi/yellow_adult_slime_dead.png | Bin 456 -> 457 bytes 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Content.Client/Buckle/BuckleSystem.cs b/Content.Client/Buckle/BuckleSystem.cs index 70d25488ba..70960d06a2 100644 --- a/Content.Client/Buckle/BuckleSystem.cs +++ b/Content.Client/Buckle/BuckleSystem.cs @@ -70,7 +70,7 @@ internal sealed class BuckleSystem : SharedBuckleSystem !buckled || args.Sprite == null) { - _rotationVisualizerSystem.SetHorizontalAngle(uid, RotationVisualsComponent.DefaultRotation, rotVisuals); + _rotationVisualizerSystem.SetHorizontalAngle(uid, rotVisuals.DefaultRotation, rotVisuals); return; } diff --git a/Content.Client/Rotation/RotationVisualsComponent.cs b/Content.Client/Rotation/RotationVisualsComponent.cs index 3ca602746e..103ee6b5d3 100644 --- a/Content.Client/Rotation/RotationVisualsComponent.cs +++ b/Content.Client/Rotation/RotationVisualsComponent.cs @@ -3,12 +3,16 @@ namespace Content.Client.Rotation; [RegisterComponent] public sealed class RotationVisualsComponent : Component { - public static readonly Angle DefaultRotation = Angle.FromDegrees(90); + [DataField("defaultRotation")] + [ViewVariables(VVAccess.ReadOnly)] + public readonly Angle DefaultRotation = Angle.FromDegrees(90); [ViewVariables(VVAccess.ReadWrite)] public Angle VerticalRotation = 0; - [ViewVariables(VVAccess.ReadWrite)] public Angle HorizontalRotation = DefaultRotation; + [DataField("horizontalRotation")] + [ViewVariables(VVAccess.ReadWrite)] + public Angle HorizontalRotation = Angle.FromDegrees(90); [ViewVariables(VVAccess.ReadWrite)] public float AnimationTime = 0.125f; diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml b/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml index 7b386c5a33..79ca05200a 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml @@ -130,6 +130,8 @@ Brute: 5 - type: Appearance - type: RotationVisuals + defaultRotation: 0 + horizontalRotation: 0 - type: FireVisuals sprite: Mobs/Effects/onfire.rsi normalState: Generic_mob_burning diff --git a/Resources/Textures/Mobs/Aliens/slimes.rsi/blue_adult_slime_dead.png b/Resources/Textures/Mobs/Aliens/slimes.rsi/blue_adult_slime_dead.png index c1dc616d25bee2612cae36079f57c82500309767..4a178f261a489bd0004221d0a061c7c4ce4b3234 100644 GIT binary patch delta 452 zcmV;#0XzQN1L^~iFn<69XF*Lt006O%3;baP00009a7bBm000id000id0mpBsWB>pG ze@R3^R9Hvtlrc*KF%-vNz3U{n93sbQyE^$HbkWVlSsk=OXIK3a4qA}fkKiH>;s+4w zcj%p3RHQg5G=h1#q^3#kE?x^d*MC&_ZcT7=mGF}BmW;Ik zyNxAYSz&EJ2yd-zu-?QaUHywz+E^MXG*Bdrq9$yOU0sUYOcJ@mppiVs! zZ=C|1oNG5>DhZ&dSTcE&3$h;~er-aUgo-L8qlx0=6#wuDNWHElkoyw)yGa|Lprd`+<{dV1W?w89#ZOgFW=0>a>p^SW&?2UUL!m505@X u%PU{(P(n2^HPA4oh6`(c>~Q>N0KNhDsFxvAa^pJy0000owGz3elbaKc+9nxqLa=GL#ieeuG^4%TZd-uNkE&)dP z?-rpq@d}_iP6{kvwnNZEZQ67xDib)fP_odOVcLIlYy4EQ2MNt z%7O1Z2fwofDt{q_CmGLSj1}-|+m8S4pMx}Ia84S))=sAH0ks5^+x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