From 5e7a71edf56f9fe53b967bd6299b48ead1170cf4 Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Thu, 2 Apr 2015 18:04:19 +0200 Subject: [PATCH] Fix crash when placing buildings in TD Caused by production queues being tied to buildings, not the player, in TD. PBOG would therefore try to find the PlaceBuilding trait, which is on the player, on the conyard actor and crash. --- OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs b/OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs index 41faa7cf3f..1ae633bb4c 100644 --- a/OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs +++ b/OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs @@ -35,7 +35,7 @@ namespace OpenRA.Mods.Common.Orders public PlaceBuildingOrderGenerator(ProductionQueue queue, string name) { producer = queue.Actor; - placeBuildingInfo = producer.Info.Traits.Get(); + placeBuildingInfo = producer.Owner.PlayerActor.Info.Traits.Get(); building = name; // Clear selection if using Left-Click Orders