fixed harvester LMB lameness; fixed ore rate

This commit is contained in:
Chris Forbes
2009-11-04 21:58:45 +13:00
parent bf997a29c0
commit d21589c6e8
3 changed files with 4 additions and 2 deletions

View File

@@ -172,7 +172,7 @@ namespace OpenRa.FileFormats
newOverlay[i,j] = 0xff; newOverlay[i,j] = 0xff;
if (!HasOverlay(i, j) && r.NextDouble() < oreRate && GetOreDensity(i, j) > 0 && canSpreadIntoCell(new int2(i, j)) if (!HasOverlay(i, j) && r.NextDouble() < oreRate && GetOreDensity(i, j) > 0 && canSpreadIntoCell(new int2(i, j))
) )
newOverlay[i, j] = ChooseOre(); //(byte)r.Next(5, 9); newOverlay[i, j] = ChooseOre();
} }
for (int j = minj; j < maxj; j++) for (int j = minj; j < maxj; j++)

View File

@@ -138,7 +138,7 @@ namespace OpenRa.Game
lastTime = Environment.TickCount; lastTime = Environment.TickCount;
} }
const int oreFrequency = 1; const int oreFrequency = 30;
static int oreTicks = oreFrequency; static int oreTicks = oreFrequency;
public static int RenderFrame = 0; public static int RenderFrame = 0;
public static double RenderTime = 0.0; public static double RenderTime = 0.0;

View File

@@ -22,6 +22,8 @@ namespace OpenRa.Game.Traits
public Order Order(Actor self, int2 xy, bool lmb, Actor underCursor) public Order Order(Actor self, int2 xy, bool lmb, Actor underCursor)
{ {
if (lmb) return null;
if (underCursor != null if (underCursor != null
&& underCursor.Owner == self.Owner && underCursor.Owner == self.Owner
&& underCursor.traits.Contains<AcceptsOre>() && !IsEmpty) && underCursor.traits.Contains<AcceptsOre>() && !IsEmpty)