Fixed SequenceEditor dependencies and lockup due to water crates being spawned on maps without water.

This commit is contained in:
Matthew Bowra-Dean
2010-02-16 20:02:59 +13:00
parent 4258e78049
commit 8b83677944
3 changed files with 4 additions and 6 deletions

View File

@@ -43,7 +43,7 @@ namespace OpenRa.Traits
{
var inWater = self.World.SharedRandom.NextDouble() < info.WaterChance;
var umt = inWater ? UnitMovementType.Float : UnitMovementType.Wheel;
int count = 0, threshold = 100;
for (; ; )
{
var p = new int2(self.World.SharedRandom.Next(0, 127), self.World.SharedRandom.Next(0, 127));
@@ -53,6 +53,8 @@ namespace OpenRa.Traits
w => crates.Add(w.CreateActor("crate", p, self.Owner)));
break;
}
if (count++ > threshold)
break;
}
}
}