mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-25 18:42:08 -05:00
Fix crashing when terrain.png is not same as terrain.png height (Thanks kingoscargames1)
This commit is contained in:
parent
983a5433ab
commit
9095bbb3b5
1 changed files with 5 additions and 0 deletions
|
@ -45,6 +45,11 @@ namespace ClassicalSharp {
|
|||
|
||||
public bool ChangeTerrainAtlas(Bitmap atlas) {
|
||||
if (!ValidateBitmap("terrain.png", atlas)) return false;
|
||||
if (atlas.Width != atlas.Height) {
|
||||
Chat.Add("&cUnable to use terrain.png from the texture pack.");
|
||||
Chat.Add("&c Its width is not the same as its height.");
|
||||
return false;
|
||||
}
|
||||
if (Graphics.LostContext) return false;
|
||||
|
||||
LoadAtlas(atlas);
|
||||
|
|
Loading…
Add table
Reference in a new issue