Fix map actors not being spawned with the correct owner

This commit is contained in:
abcdefg30
2022-12-24 09:25:16 +01:00
committed by Gustas
parent 5ffb564376
commit 5a12f44a25

View File

@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Common.Traits
// If an actor's doesn't have a valid owner transfer ownership to neutral
var ownerInit = actorReference.Get<OwnerInit>();
if (!world.Players.Any(p => p.InternalName == ownerInit.InstanceName))
if (!world.Players.Any(p => p.InternalName == ownerInit.InternalName))
{
actorReference.Remove(ownerInit);
actorReference.Add(new OwnerInit(world.WorldActor.Owner));