Fix eye target not updating on rider shutdown (#20094)

This commit is contained in:
metalgearsloth 2023-09-13 14:25:34 +10:00 committed by Debug
parent 5f83da960a
commit 4bf1957082
1 changed files with 2 additions and 2 deletions

View 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);
}
}