Fix eye target not updating on rider shutdown (#20094)
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user