More decimals for RTG stats / Pathfinder crash fix in editor

This commit is contained in:
Anuken
2025-05-23 19:23:09 -04:00
parent f063c56171
commit 91ca60e90f
2 changed files with 9 additions and 3 deletions

View File

@@ -145,10 +145,16 @@ public class Pathfinder implements Runnable{
Events.on(ResetEvent.class, event -> stop());
Events.on(TileChangeEvent.class, event -> updateTile(event.tile));
Events.on(TileChangeEvent.class, event -> {
if(state.isEditor()) return;
updateTile(event.tile);
});
//remove nearSolid flag for tiles
Events.on(TilePreChangeEvent.class, event -> {
if(state.isEditor()) return;
Tile tile = event.tile;
if(tile.solid()){
@@ -228,7 +234,7 @@ public class Pathfinder implements Runnable{
if(other.legSolid()) nearLegSolid = true;
//other tile is now near solid
if(solid && !tile.block().teamPassable){
if(solid && !tile.block().teamPassable && other.array() < tiles.length){
tiles[other.array()] |= PathTile.bitMaskNearSolid;
}
}