Merge pull request #11194 from abcdefg30/providesTech

Fix ProvidesPrerequisite not refreshing the tech tree (on owner change)
This commit is contained in:
Oliver Brakmann
2016-05-29 20:30:23 +02:00
2 changed files with 4 additions and 4 deletions

View File

@@ -301,11 +301,11 @@ namespace OpenRA
Owner = newOwner;
Generation++;
if (wasInWorld)
w.Add(this);
foreach (var t in TraitsImplementing<INotifyOwnerChanged>())
t.OnOwnerChanged(this, oldOwner, newOwner);
if (wasInWorld)
w.Add(this);
});
}

View File

@@ -189,7 +189,7 @@ namespace OpenRA.Mods.Common.Traits
void INotifyOwnerChanged.OnOwnerChanged(Actor self, Player oldOwner, Player newOwner)
{
skipTriggerUpdate = false;
Game.RunAfterTick(() => skipTriggerUpdate = false);
}
}
}