Fix SharedPullable exception (#2431)
* Fix SharedPullable exception * Smug in a bucket * Logging Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -11,6 +11,7 @@ using Robust.Shared.GameObjects.ComponentDependencies;
|
||||
using Robust.Shared.GameObjects.Components;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Serialization;
|
||||
@@ -181,7 +182,13 @@ namespace Content.Shared.GameObjects.Components.Pulling
|
||||
return;
|
||||
}
|
||||
|
||||
Puller = Owner.EntityManager.GetEntity(state.Puller.Value);
|
||||
if (!Owner.EntityManager.TryGetEntity(state.Puller.Value, out var entity))
|
||||
{
|
||||
Logger.Error($"Invalid entity {state.Puller.Value} for pulling");
|
||||
return;
|
||||
}
|
||||
|
||||
Puller = entity;
|
||||
}
|
||||
|
||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||
|
||||
Reference in New Issue
Block a user