fixed unit production bug; unit is not emitted until space is clear.

This commit is contained in:
Chris Forbes
2009-11-17 20:17:25 +13:00
parent 7711a0bf01
commit a2de047c9f
4 changed files with 40 additions and 8 deletions

View File

@@ -337,6 +337,10 @@ namespace OpenRa.Game
}
else
{
var productionPoint = (1 / 24f * producer.CenterLocation).ToInt2();
if (UnitInfluence.GetUnitAt(productionPoint) != null)
return;
unit = new Actor(name, (1 / 24f * producer.CenterLocation).ToInt2(), player);
var mobile = unit.traits.Get<Mobile>();
mobile.facing = 128;