Fix pullable movement modifier (#4684)
This commit is contained in:
@@ -47,6 +47,7 @@ namespace Content.Shared.Pulling.Components
|
||||
}
|
||||
|
||||
var eventBus = Owner.EntityManager.EventBus;
|
||||
// TODO: JESUS
|
||||
|
||||
// New value. Abandon being pulled by any existing object.
|
||||
if (_puller != null)
|
||||
@@ -54,6 +55,11 @@ namespace Content.Shared.Pulling.Components
|
||||
var oldPuller = _puller;
|
||||
var oldPullerPhysics = PullerPhysics;
|
||||
|
||||
if (_puller.TryGetComponent(out SharedPullerComponent? puller))
|
||||
{
|
||||
puller.Pulling = null;
|
||||
}
|
||||
|
||||
_puller = null;
|
||||
Dirty();
|
||||
PullerPhysics = null;
|
||||
@@ -67,6 +73,7 @@ namespace Content.Shared.Pulling.Components
|
||||
|
||||
_physics.WakeBody();
|
||||
}
|
||||
|
||||
// else-branch warning is handled below
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user