Reinit the sheetbuilder too - appending more sprites to the old sheets isn't the best of ideas. Fixes "Terrain sprites span multiple sheets" on cnc tundra map.

This commit is contained in:
Paul Chote
2010-11-27 15:11:38 +13:00
parent d559b5cdb7
commit f9f9fbf3e4

View File

@@ -20,11 +20,11 @@ namespace OpenRA
{
public readonly Manifest Manifest;
public readonly ObjectCreator ObjectCreator;
public readonly SheetBuilder SheetBuilder;
public readonly CursorSheetBuilder CursorSheetBuilder;
public readonly Dictionary<string, MapStub> AvailableMaps;
public readonly WidgetLoader WidgetLoader;
public ILoadScreen LoadScreen = null;
public SheetBuilder SheetBuilder;
public CursorSheetBuilder CursorSheetBuilder;
public ModData( params string[] mods )
{
@@ -81,7 +81,9 @@ namespace OpenRA
if (map.Tileset != cachedTileset
|| previousMapHadSequences || map.Sequences.Count > 0)
{
SheetBuilder = new SheetBuilder( TextureChannel.Red );
SpriteSheetBuilder.Initialize( Rules.TileSets[map.Tileset] );
CursorSheetBuilder = new CursorSheetBuilder( this );
CursorProvider.Initialize(Manifest.Cursors);
SequenceProvider.Initialize(Manifest.Sequences, map.Sequences);
cachedTileset = map.Tileset;