Fix ApcPowerReceiverComponent deletion (#5031)

Co-authored-by: Julian Giebel <j.giebel@netrocks.info>
This commit is contained in:
Julian Giebel
2021-10-25 21:55:00 +02:00
committed by GitHub
parent 3bbe8f7652
commit d1a830cd74
3 changed files with 30 additions and 1 deletions

View File

@@ -79,7 +79,7 @@ namespace Content.Server.Power.EntitySystems
foreach (var entity in nearbyEntities)
{
if (entity.TryGetComponent<ExtensionCableReceiverComponent>(out var receiver) &&
if (EntityManager.TryGetComponent<ExtensionCableReceiverComponent>(entity.Uid, out var receiver) &&
receiver.Connectable &&
receiver.Provider == null &&
entity.Transform.Coordinates.TryDistance(owner.EntityManager, owner.Transform.Coordinates, out var distance) &&