Fixed SequenceEditor dependencies and lockup due to water crates being spawned on maps without water.
This commit is contained in:
@@ -43,7 +43,7 @@ namespace OpenRa.Traits
|
|||||||
{
|
{
|
||||||
var inWater = self.World.SharedRandom.NextDouble() < info.WaterChance;
|
var inWater = self.World.SharedRandom.NextDouble() < info.WaterChance;
|
||||||
var umt = inWater ? UnitMovementType.Float : UnitMovementType.Wheel;
|
var umt = inWater ? UnitMovementType.Float : UnitMovementType.Wheel;
|
||||||
|
int count = 0, threshold = 100;
|
||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
var p = new int2(self.World.SharedRandom.Next(0, 127), self.World.SharedRandom.Next(0, 127));
|
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)));
|
w => crates.Add(w.CreateActor("crate", p, self.Owner)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (count++ > threshold)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,10 +31,6 @@
|
|||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<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" />
|
||||||
<Reference Include="System.Core">
|
<Reference Include="System.Core">
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using IjwFramework.Types;
|
using OpenRa.FileFormats;
|
||||||
|
|
||||||
namespace SequenceEditor
|
namespace SequenceEditor
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user