Crash fix

This commit is contained in:
Anuken
2019-09-13 08:17:47 -04:00
parent 55da9df2a1
commit 066e4380e1
2 changed files with 6 additions and 2 deletions

View File

@@ -141,6 +141,10 @@ public class Renderer implements ApplicationListener{
}
}
public float landScale(){
return landTime > 0 ? landscale : 1f;
}
@Override
public void dispose(){
minimap.dispose();

View File

@@ -37,8 +37,8 @@ public class Pixelator implements Disposable{
float px = Core.camera.position.x, py = Core.camera.position.y;
Core.camera.position.set((int)px + ((int)(camera.width) % 2 == 0 ? 0 : 0.5f), (int)py + ((int)(camera.height) % 2 == 0 ? 0 : 0.5f));
int w = (int)(Core.camera.width);
int h = (int)(Core.camera.height);
int w = (int)(Core.camera.width * renderer.landScale());
int h = (int)(Core.camera.height * renderer.landScale());
if(!graphics.isHidden() && (buffer.getWidth() != w || buffer.getHeight() != h)){
buffer.resize(w, h);