]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix eye target not updating on rider shutdown (#20094)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Wed, 13 Sep 2023 04:25:34 +0000 (14:25 +1000)
committerGitHub <noreply@github.com>
Wed, 13 Sep 2023 04:25:34 +0000 (14:25 +1000)
Content.Client/Vehicle/VehicleSystem.cs

index e1bb7838721eb9e8bfa154188d962b4ee58d1b14..2092163b00efe850a14be5c8a8f4fe242c5ec9bd 100644 (file)
@@ -31,9 +31,9 @@ public sealed class VehicleSystem : SharedVehicleSystem
     private void OnRiderShutdown(EntityUid uid, RiderComponent component, ComponentShutdown args)
     {
         // reset the riders eye centering.
-        if (TryComp(uid, out EyeComponent? eyeComp) && eyeComp.Target == component.Vehicle)
+        if (TryComp(uid, out EyeComponent? eyeComp))
         {
-            _eye.SetTarget(uid, eyeComp.Target, eyeComp);
+            _eye.SetTarget(uid, null, eyeComp);
         }
     }