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;
}
}
}

View File

@@ -31,10 +31,6 @@
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="IjwFramework, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Ijw.DirectX\bin\IjwFramework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using IjwFramework.Types;
using OpenRa.FileFormats;
namespace SequenceEditor
{