Fix rare crash when terrain.png changes to a different size partway through the map loading.

This commit is contained in:
UnknownShadow200 2016-04-20 08:16:05 +10:00
parent b1a6e87d92
commit 10ca60c2d6

View File

@ -80,7 +80,8 @@ namespace ClassicalSharp.Renderers {
}
public void Refresh() {
chunkPos = new Vector3I( int.MaxValue );
chunkPos = new Vector3I( int.MaxValue );
totalUsed = new int[game.TerrainAtlas1D.TexIds.Length];
if( chunks == null || game.World.IsNotLoaded ) return;
ClearChunkCache();
CreateChunkCache();