Fix crash when pulling a potted plant (#1530)
* Fix crash when pulling a potted plant * Fix being able to pull anchored entities
This commit is contained in:
@@ -277,8 +277,13 @@ namespace Content.Server.GameObjects.EntitySystems.Click
|
||||
return false;
|
||||
}
|
||||
|
||||
var physics = pull.Owner.GetComponent<IPhysicsComponent>();
|
||||
var controller = physics.EnsureController<PullController>();
|
||||
if (!pull.Owner.TryGetComponent(out ICollidableComponent collidable) ||
|
||||
collidable.Anchored)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var controller = collidable.EnsureController<PullController>();
|
||||
|
||||
if (controller.GettingPulled)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user