Fixed rotation check for pulling (#8845)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -85,6 +85,13 @@ namespace Content.Shared.Pulling
|
||||
|
||||
if (msg.Cancelled) return false;
|
||||
|
||||
// Stop pulling confirmed!
|
||||
|
||||
if (TryComp<PhysicsComponent>(pullable.Owner, out var pullablePhysics))
|
||||
{
|
||||
pullablePhysics.FixedRotation = pullable.PrevFixedRotation;
|
||||
}
|
||||
|
||||
_pullSm.ForceRelationship(null, pullable);
|
||||
return true;
|
||||
}
|
||||
@@ -172,11 +179,11 @@ namespace Content.Shared.Pulling
|
||||
RaiseLocalEvent(pullable.Owner, pullAttempt);
|
||||
|
||||
if (pullAttempt.Cancelled)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
_pullSm.ForceRelationship(puller, pullable);
|
||||
pullable.PrevFixedRotation = pullablePhysics.FixedRotation;
|
||||
pullablePhysics.FixedRotation = pullable.FixedRotationOnPull;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user