Conyard plays build animation when placing structures
This commit is contained in:
@@ -26,6 +26,14 @@ namespace OpenRa.Traits
|
|||||||
Sound.PlayToPlayer(order.Player, "placbldg.aud");
|
Sound.PlayToPlayer(order.Player, "placbldg.aud");
|
||||||
Sound.PlayToPlayer(order.Player, "build5.aud");
|
Sound.PlayToPlayer(order.Player, "build5.aud");
|
||||||
|
|
||||||
|
var fact = self.World.Queries
|
||||||
|
.OwnedBy[self.Owner]
|
||||||
|
.WithTrait<ConstructionYard>()
|
||||||
|
.Select(x=>x.Actor).FirstOrDefault();
|
||||||
|
|
||||||
|
if (fact != null)
|
||||||
|
fact.traits.Get<RenderBuilding>().PlayCustomAnim(fact, "build");
|
||||||
|
|
||||||
queue.FinishProduction(unit.Category);
|
queue.FinishProduction(unit.Category);
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user