Fixed #2672
This commit is contained in:
@@ -87,7 +87,7 @@ public class Vars implements Loadable{
|
|||||||
/** turns needed to destroy a sector completely */
|
/** turns needed to destroy a sector completely */
|
||||||
public static final float sectorDestructionTurns = 3f;
|
public static final float sectorDestructionTurns = 3f;
|
||||||
/** min armor fraction damage; e.g. 0.05 = at least 5% damage */
|
/** min armor fraction damage; e.g. 0.05 = at least 5% damage */
|
||||||
public static final float minArmorDamage = 0.05f;
|
public static final float minArmorDamage = 0.1f;
|
||||||
/** launch animation duration */
|
/** launch animation duration */
|
||||||
public static final float launchDuration = 140f;
|
public static final float launchDuration = 140f;
|
||||||
/** size of tiles in units */
|
/** size of tiles in units */
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ public class Pathfinder implements Runnable{
|
|||||||
PathTile.health(tile) * 5 +
|
PathTile.health(tile) * 5 +
|
||||||
(PathTile.nearSolid(tile) ? 2 : 0) +
|
(PathTile.nearSolid(tile) ? 2 : 0) +
|
||||||
(PathTile.nearLiquid(tile) ? 6 : 0) +
|
(PathTile.nearLiquid(tile) ? 6 : 0) +
|
||||||
(PathTile.deep(tile) ? 70 : 0),
|
(PathTile.deep(tile) ? 70 : 0) +
|
||||||
|
(PathTile.damages(tile) ? 30 : 0),
|
||||||
|
|
||||||
//legs
|
//legs
|
||||||
(team, tile) -> PathTile.legSolid(tile) ? impassable : 1 +
|
(team, tile) -> PathTile.legSolid(tile) ? impassable : 1 +
|
||||||
@@ -52,7 +53,8 @@ public class Pathfinder implements Runnable{
|
|||||||
//water
|
//water
|
||||||
(team, tile) -> PathTile.solid(tile) || !PathTile.liquid(tile) ? 200 : 2 + //TODO cannot go through blocks - pathfinding isn't great
|
(team, tile) -> PathTile.solid(tile) || !PathTile.liquid(tile) ? 200 : 2 + //TODO cannot go through blocks - pathfinding isn't great
|
||||||
(PathTile.nearGround(tile) || PathTile.nearSolid(tile) ? 14 : 0) +
|
(PathTile.nearGround(tile) || PathTile.nearSolid(tile) ? 14 : 0) +
|
||||||
(PathTile.deep(tile) ? -1 : 0)
|
(PathTile.deep(tile) ? -1 : 0) +
|
||||||
|
(PathTile.damages(tile) ? 35 : 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
//maps team, cost, type to flow field
|
//maps team, cost, type to flow field
|
||||||
@@ -122,7 +124,8 @@ public class Pathfinder implements Runnable{
|
|||||||
nearLiquid,
|
nearLiquid,
|
||||||
nearGround,
|
nearGround,
|
||||||
nearSolid,
|
nearSolid,
|
||||||
tile.floor().isDeep()
|
tile.floor().isDeep(),
|
||||||
|
tile.floor().damageTaken > 0.00001f
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -514,5 +517,7 @@ public class Pathfinder implements Runnable{
|
|||||||
boolean nearSolid;
|
boolean nearSolid;
|
||||||
//whether this block is deep / drownable
|
//whether this block is deep / drownable
|
||||||
boolean deep;
|
boolean deep;
|
||||||
|
//whether the floor damages
|
||||||
|
boolean damages;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user