diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 4c630b7340..e4dffdb406 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -581,7 +581,7 @@ public class UnitTypes implements ContentList{ }}; atrax = new UnitType("atrax"){{ - speed = 0.5f; + speed = 0.54f; drag = 0.4f; hitSize = 13f; rotateSpeed = 3f; @@ -621,7 +621,7 @@ public class UnitTypes implements ContentList{ }}; spiroct = new UnitType("spiroct"){{ - speed = 0.45f; + speed = 0.48f; drag = 0.4f; hitSize = 15f; rotateSpeed = 3f; diff --git a/core/src/mindustry/world/blocks/defense/turrets/LiquidTurret.java b/core/src/mindustry/world/blocks/defense/turrets/LiquidTurret.java index 2a2131c6b9..56275eb3d6 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/LiquidTurret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/LiquidTurret.java @@ -100,17 +100,27 @@ public class LiquidTurret extends Turret{ @Override protected void findTarget(){ if(extinguish && liquids.current().canExtinguish()){ + Fire result = null; + float mindst = 0f; int tr = (int)(range / tilesize); for(int x = -tr; x <= tr; x++){ for(int y = -tr; y <= tr; y++){ - Tile other = world.tileWorld(x + tile.x, y + tile.y); + Tile other = world.tile(x + tile.x, y + tile.y); + var fire = Fires.get(x + tile.x, y + tile.y); + float dst = fire == null ? 0 : dst2(fire); //do not extinguish fires on other team blocks - if(other != null && Fires.has(x + tile.x, y + tile.y) && (other.build == null || other.team() == team)){ - target = Fires.get(x + tile.x, y + tile.y); - return; + if(other != null && fire != null && dst <= range * range && (result == null || dst < mindst) && (other.build == null || other.team() == team)){ + result = fire; + mindst = dst; } } } + + if(result != null){ + target = result; + //don't run standard targeting + return; + } } super.findTarget();