Crash fix
This commit is contained in:
@@ -141,6 +141,10 @@ public class Renderer implements ApplicationListener{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float landScale(){
|
||||||
|
return landTime > 0 ? landscale : 1f;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dispose(){
|
public void dispose(){
|
||||||
minimap.dispose();
|
minimap.dispose();
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ public class Pixelator implements Disposable{
|
|||||||
float px = Core.camera.position.x, py = Core.camera.position.y;
|
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));
|
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 w = (int)(Core.camera.width * renderer.landScale());
|
||||||
int h = (int)(Core.camera.height);
|
int h = (int)(Core.camera.height * renderer.landScale());
|
||||||
|
|
||||||
if(!graphics.isHidden() && (buffer.getWidth() != w || buffer.getHeight() != h)){
|
if(!graphics.isHidden() && (buffer.getWidth() != w || buffer.getHeight() != h)){
|
||||||
buffer.resize(w, h);
|
buffer.resize(w, h);
|
||||||
|
|||||||
Reference in New Issue
Block a user