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