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