mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-25 22:58:47 +07:00
remove nearGround in favor of !nearLiquid
This commit is contained in:
parent
b38e7f66ad
commit
8751e77876
@ -103,15 +103,13 @@ public class Pathfinder implements Runnable{
|
||||
|
||||
/** Packs a tile into its internal representation. */
|
||||
private int packTile(Tile tile){
|
||||
//TODO nearGround is just the inverse of nearLiquid?
|
||||
boolean nearLiquid = false, nearSolid = false, nearGround = false;
|
||||
boolean nearLiquid = false, nearSolid = false;
|
||||
|
||||
for(int i = 0; i < 4; i++){
|
||||
Tile other = tile.getNearby(i);
|
||||
if(other != null){
|
||||
if(other.floor().isLiquid) nearLiquid = true;
|
||||
if(other.solid()) nearSolid = true;
|
||||
if(!other.floor().isLiquid) nearGround = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,7 +120,7 @@ public class Pathfinder implements Runnable{
|
||||
tile.floor().isLiquid,
|
||||
tile.staticDarkness() >= 2,
|
||||
nearLiquid,
|
||||
nearGround,
|
||||
!nearLiquid, // means its near the ground
|
||||
nearSolid,
|
||||
tile.floor().isDeep(),
|
||||
tile.floor().damageTaken > 0.00001f
|
||||
|
Loading…
Reference in New Issue
Block a user