Properly fix chair collision & disallow pulling objects you're buckled to (#3241)
Co-authored-by: cyclowns <cyclowns@protonmail.ch>
This commit is contained in:
@@ -263,11 +263,20 @@ namespace Content.Server.GameObjects.Components.Buckle
|
||||
|
||||
SendMessage(new BuckleMessage(Owner, to));
|
||||
|
||||
if (Owner.TryGetComponent(out PullableComponent? pullableComponent))
|
||||
if (Owner.TryGetComponent(out PullableComponent? ownerPullable))
|
||||
{
|
||||
if (pullableComponent.Puller != null)
|
||||
if (ownerPullable.Puller != null)
|
||||
{
|
||||
pullableComponent.TryStopPull();
|
||||
ownerPullable.TryStopPull();
|
||||
}
|
||||
}
|
||||
|
||||
if (to.TryGetComponent(out PullableComponent? toPullable))
|
||||
{
|
||||
if (toPullable.Puller == Owner)
|
||||
{
|
||||
// can't pull it and buckle to it at the same time
|
||||
toPullable.TryStopPull();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user