This commit is contained in:
Paul Chote
2011-02-11 19:17:27 +13:00
parent 5f6d2df503
commit c5d410938d
2 changed files with 6 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Editor
= new TileReference<byte, byte> = new TileReference<byte, byte>
{ {
type = (byte)Resource.Info.ResourceType, type = (byte)Resource.Info.ResourceType,
index = (byte)Resource.Value index = (byte)random.Next(Resource.Info.SpriteNames.Length)
}; };
var ch = new int2((surface.GetBrushLocation().X) / Surface.ChunkSize, var ch = new int2((surface.GetBrushLocation().X) / Surface.ChunkSize,

View File

@@ -279,7 +279,11 @@ namespace OpenRA
// Load resource data // Load resource data
for (int i = 0; i < MapSize.X; i++) for (int i = 0; i < MapSize.X; i++)
for (int j = 0; j < MapSize.Y; j++) for (int j = 0; j < MapSize.Y; j++)
MapResources[i, j] = new TileReference<byte, byte>(ReadByte(dataStream), ReadByte(dataStream)); {
byte type = ReadByte(dataStream);
byte index = ReadByte(dataStream);
MapResources[i, j] = new TileReference<byte, byte>(type, index);
}
} }
} }