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 GitHub
parent 0a4fcd71ff
commit a936f68bfa

View File

@@ -31,9 +31,9 @@ public sealed class VehicleSystem : SharedVehicleSystem
private void OnRiderShutdown(EntityUid uid, RiderComponent component, ComponentShutdown args) private void OnRiderShutdown(EntityUid uid, RiderComponent component, ComponentShutdown args)
{ {
// reset the riders eye centering. // 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);
} }
} }