Fix throw controller not handling deleted thrown stuff (#1097)
This commit is contained in:
@@ -33,7 +33,7 @@ namespace Content.Shared.Physics
|
|||||||
|
|
||||||
public void StopThrow()
|
public void StopThrow()
|
||||||
{
|
{
|
||||||
if (_component == null) return;
|
if (_component == null || _component.Owner.Deleted) return;
|
||||||
if (IoCManager.Resolve<IPhysicsManager>().IsWeightless(_component.Owner.Transform.GridPosition))
|
if (IoCManager.Resolve<IPhysicsManager>().IsWeightless(_component.Owner.Transform.GridPosition))
|
||||||
{
|
{
|
||||||
Timer.Spawn((int) (ThrowTime * 1000), StopThrow);
|
Timer.Spawn((int) (ThrowTime * 1000), StopThrow);
|
||||||
|
|||||||
Reference in New Issue
Block a user