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.
This commit is contained in:
Oliver Brakmann
2015-04-02 18:04:19 +02:00
parent dc3f82f537
commit 5e7a71edf5

View File

@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Common.Orders
public PlaceBuildingOrderGenerator(ProductionQueue queue, string name)
{
producer = queue.Actor;
placeBuildingInfo = producer.Info.Traits.Get<PlaceBuildingInfo>();
placeBuildingInfo = producer.Owner.PlayerActor.Info.Traits.Get<PlaceBuildingInfo>();
building = name;
// Clear selection if using Left-Click Orders