maintenance on Ore

This commit is contained in:
Bob
2010-01-17 19:22:50 +13:00
parent 55ebd1deae
commit b581f248a7
3 changed files with 4 additions and 4 deletions

View File

@@ -79,7 +79,6 @@ namespace OpenRa
players[i] = new Player(i, LobbyInfo.Clients.FirstOrDefault(a => a.Index == i));
}
Game.world.Map.InitOreDensity();
worldRenderer = new WorldRenderer(renderer);
SequenceProvider.Initialize(usingAftermath);

View File

@@ -110,17 +110,17 @@ namespace OpenRa
return (byte)sum;
}
public static bool HasOverlay(this Map map, int i, int j)
static bool HasOverlay(this Map map, int i, int j)
{
return map.MapTiles[i, j].overlay < overlayIsOre.Length;
}
public static bool ContainsOre(this Map map, int i, int j)
static bool ContainsOre(this Map map, int i, int j)
{
return map.HasOverlay(i, j) && overlayIsOre[map.MapTiles[i, j].overlay];
}
public static bool ContainsGem(this Map map, int i, int j)
static bool ContainsGem(this Map map, int i, int j)
{
return map.HasOverlay(i, j) && overlayIsGems[map.MapTiles[i, j].overlay];
}

View File

@@ -32,6 +32,7 @@ namespace OpenRa
oreFrequency = (int)(Rules.General.GrowthRate * 60 * 25);
oreTicks = oreFrequency;
Map.InitOreDensity();
CreateActor("World", new int2(int.MaxValue, int.MaxValue), null);
}