More fixes

This commit is contained in:
Paul Chote
2010-04-01 21:16:58 +13:00
committed by Bob
parent b8702e494b
commit 705e3eb2f6
4 changed files with 8 additions and 7 deletions

View File

@@ -28,6 +28,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>

View File

@@ -24,12 +24,12 @@ using OpenRA.Graphics;
namespace OpenRA.Traits
{
class ResourceLayerInfo : ITraitInfo
public class ResourceLayerInfo : ITraitInfo
{
public object Create(Actor self) { return new ResourceLayer(self); }
}
class ResourceLayer// : IRenderOverlay, ILoadWorldHook
public class ResourceLayer// : IRenderOverlay, ILoadWorldHook
{
public ResourceLayer(Actor self) {}
public void Destroy(int2 p){}

View File

@@ -76,8 +76,8 @@ namespace OpenRA.Traits
[Conditional( "SANITY_CHECKS" )]
void SanityCheck( Actor self )
{
for( int y = 0 ; y < self.World.Map.MapSize.Y ; y++ )
for( int x = 0 ; x < self.World.Map.MapSize.X ; x++ )
for( int y = 0 ; y < self.World.Map.MapSize.Y ; y++ )
if( influence[ x, y ] != null )
foreach (var a in influence[ x, y ])
if (!a.traits.Get<IOccupySpace>().OccupiedCells().Contains( new int2( x, y ) ) )

View File

@@ -55,8 +55,8 @@ namespace OpenRA
public void Draw( World world )
{
if (Game.Settings.UnitDebug)
for (var j = 0; j < world.Map.MapSize.Y; j++)
for (var i = 0; i < world.Map.MapSize.X; i++)
for (var j = 0; j < world.Map.MapSize.Y; j++)
if (world.WorldActor.traits.Get<UnitInfluence>().GetUnitsAt(new int2(i, j)).Any())
spriteRenderer.DrawSprite(unitDebug, Game.CellSize * new float2(i, j), "terrain");
}