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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user