This commit is contained in:
Rane
2022-04-23 21:05:02 -04:00
committed by GitHub
parent 18220b6488
commit 98cd4fdb58
44 changed files with 1160 additions and 15 deletions

View File

@@ -2,6 +2,7 @@ using System.Diagnostics.CodeAnalysis;
using Content.Server.Hands.Components;
using Content.Server.Pulling;
using Content.Shared.ActionBlocker;
using Content.Shared.Vehicle.Components;
using Content.Shared.Alert;
using Content.Shared.Buckle.Components;
using Content.Shared.Interaction;
@@ -288,6 +289,10 @@ namespace Content.Server.Buckle.Components
{
return false;
}
// If the strap is a vehicle and the rider is not the person unbuckling, return.
if (_entMan.TryGetComponent<VehicleComponent>(oldBuckledTo.Owner, out var vehicle) &&
vehicle.Rider != user)
return false;
}
BuckledTo = null;