oops. fixed growth and wired up.

This commit is contained in:
Chris Forbes
2009-11-02 23:15:29 +13:00
parent c615920209
commit 5d07ca2c90
2 changed files with 18 additions and 6 deletions

View File

@@ -136,6 +136,8 @@ namespace OpenRa.Game
lastTime = Environment.TickCount;
}
static int oreTicks = 20;
public static void Tick()
{
int t = Environment.TickCount;
@@ -149,6 +151,11 @@ namespace OpenRa.Game
if( controller.orderGenerator != null )
controller.orderGenerator.Tick();
if (--oreTicks == 0)
{
map.GrowOre(p => IsCellBuildable(p, UnitMovementType.Wheel), SharedRandom);
oreTicks = 20;
}
world.Tick();
UnitInfluence.Tick();
foreach( var player in players.Values )