Fixes for view range bugs
This commit is contained in:
@@ -67,6 +67,7 @@ public class Control extends RendererModule{
|
||||
|
||||
@Override
|
||||
public void update(){
|
||||
|
||||
if(Inputs.keyUp(Keys.ESCAPE) && debug)
|
||||
Gdx.app.exit();
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@ public class Renderer{
|
||||
World.tile(tilex, tiley).floor().drawCache(World.tile(tilex, tiley));
|
||||
}
|
||||
}
|
||||
|
||||
caches.put(cx, cy, Caches.end());
|
||||
}
|
||||
}
|
||||
@@ -53,7 +52,7 @@ public class Renderer{
|
||||
|
||||
Draw.end();
|
||||
|
||||
int crangex = (int)(camera.viewportWidth/(chunksize*tilesize));
|
||||
int crangex = (int)(camera.viewportWidth/(chunksize*tilesize))+1;
|
||||
int crangey = (int)(camera.viewportHeight/(chunksize*tilesize))+1;
|
||||
|
||||
for(int x = -crangex; x <= crangex; x++){
|
||||
|
||||
@@ -3,6 +3,7 @@ package io.anuke.mindustry.ai;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
import com.badlogic.gdx.ai.pfa.DefaultGraphPath;
|
||||
import com.badlogic.gdx.ai.pfa.PathFinder;
|
||||
import com.badlogic.gdx.ai.pfa.indexed.IndexedAStarPathFinder;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
@@ -13,7 +14,7 @@ import io.anuke.ucore.core.Effects;
|
||||
public class Pathfind{
|
||||
static MHueristic heuristic = new MHueristic();
|
||||
static PassTileGraph passgraph = new PassTileGraph();
|
||||
static IndexedAStarPathFinder<Tile> passpathfinder;
|
||||
static PathFinder<Tile> passpathfinder;
|
||||
static Array<DefaultGraphPath<Tile>> paths = new Array<>();
|
||||
static Tile[][] pathSequences;
|
||||
static Vector2 vector = new Vector2();
|
||||
|
||||
Reference in New Issue
Block a user