From 0236dd04ae67483d5daeb8a46c2783865c176d25 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Thu, 30 Jun 2011 01:14:07 +1200 Subject: [PATCH] Work around capturable tech bug. --- OpenRA.Mods.RA/Player/ProductionQueue.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenRA.Mods.RA/Player/ProductionQueue.cs b/OpenRA.Mods.RA/Player/ProductionQueue.cs index 312459591a..e7ebb048bd 100755 --- a/OpenRA.Mods.RA/Player/ProductionQueue.cs +++ b/OpenRA.Mods.RA/Player/ProductionQueue.cs @@ -77,6 +77,12 @@ namespace OpenRA.Mods.RA // Produceable contains the tech from the original owner - this is desired so we don't clear it. Produceable = InitTech(self.Owner.PlayerActor); + + // Force a third(!) tech tree update to ensure that prerequisites are correct. + // The first two updates are triggered by adding/removing the actor when + // changing ownership, *before* the new techtree watchers have been set up. + // This is crap. + self.Owner.PlayerActor.Trait().Update(); } Dictionary InitTech(Actor playerActor)