From f9f9fbf3e4dfa481a1920038b64ea4bcac0979ce Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 27 Nov 2010 15:11:38 +1300 Subject: [PATCH] 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. --- OpenRA.Game/ModData.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/OpenRA.Game/ModData.cs b/OpenRA.Game/ModData.cs index 41292000ed..71b476ffc6 100755 --- a/OpenRA.Game/ModData.cs +++ b/OpenRA.Game/ModData.cs @@ -20,12 +20,12 @@ namespace OpenRA { public readonly Manifest Manifest; public readonly ObjectCreator ObjectCreator; - public readonly SheetBuilder SheetBuilder; - public readonly CursorSheetBuilder CursorSheetBuilder; public readonly Dictionary AvailableMaps; public readonly WidgetLoader WidgetLoader; public ILoadScreen LoadScreen = null; - + public SheetBuilder SheetBuilder; + public CursorSheetBuilder CursorSheetBuilder; + public ModData( params string[] mods ) { Manifest = new Manifest( 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;