diff --git a/OpenRA.Mods.Common/Scripting/Properties/ProductionProperties.cs b/OpenRA.Mods.Common/Scripting/Properties/ProductionProperties.cs index e1d7734798..52c5ab3670 100644 --- a/OpenRA.Mods.Common/Scripting/Properties/ProductionProperties.cs +++ b/OpenRA.Mods.Common/Scripting/Properties/ProductionProperties.cs @@ -112,7 +112,7 @@ namespace OpenRA.Mods.Common.Scripting if (actionFunc != null) { - var playerIndex = Self.Owner.ClientIndex; + var player = Self.Owner; var squadSize = actorTypes.Length; var squad = new List(); var func = actionFunc.CopyReference() as LuaFunction; @@ -120,7 +120,7 @@ namespace OpenRA.Mods.Common.Scripting Action productionHandler = (_, __) => { }; productionHandler = (factory, unit) => { - if (playerIndex != factory.Owner.ClientIndex) + if (player != factory.Owner) { triggers.OnProducedInternal -= productionHandler; return;