EnvMapApperance should clear client animations, fixes #74.

This commit is contained in:
UnknownShadow200 2015-09-16 17:20:59 +10:00
parent 9b7e12bb9d
commit 766943bd8c
3 changed files with 4 additions and 0 deletions

View File

@ -606,6 +606,7 @@ namespace ClassicalSharp {
TexturePackExtractor extractor = new TexturePackExtractor();
extractor.Extract( game.defaultTexPack, game );
} else {
game.Animations.Dispose();
game.AsyncDownloader.DownloadImage( url, true, "terrain" );
}
Utils.LogDebug( "Image url: " + url );

View File

@ -29,7 +29,9 @@ namespace ClassicalSharp.TexturePack {
if( bmp != null ) {
fastBmp.Dispose();
bmp.Dispose();
bmp = null;
}
animations.Clear();
}
public void Tick( double delta ) {

View File

@ -11,6 +11,7 @@ namespace ClassicalSharp.TexturePack {
Game game;
public void Extract( string path, Game game ) {
this.game = game;
game.Animations.Dispose();
using( FileStream fs = new FileStream( path, FileMode.Open, FileAccess.Read, FileShare.Read ) ) {
ZipReader reader = new ZipReader();
reader.ShouldProcessZipEntry = ShouldProcessZipEntry;