Fix bogus owner check in Lua API production code

This commit is contained in:
Oliver Brakmann
2015-11-09 19:31:19 +01:00
parent 5df01b2137
commit b30bae08c0

View File

@@ -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<Actor>();
var func = actionFunc.CopyReference() as LuaFunction;
@@ -120,7 +120,7 @@ namespace OpenRA.Mods.Common.Scripting
Action<Actor, Actor> productionHandler = (_, __) => { };
productionHandler = (factory, unit) =>
{
if (playerIndex != factory.Owner.ClientIndex)
if (player != factory.Owner)
{
triggers.OnProducedInternal -= productionHandler;
return;