1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-20 04:47:54 +03:00

Fixed non-existent fire being targeted

This commit is contained in:
Anuken 2021-06-28 13:30:54 -04:00
parent fcdbd4b117
commit f6f1ddb826

View File

@ -109,7 +109,7 @@ public class LiquidTurret extends Turret{
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 && fire != null && dst <= range * range && (result == null || dst < mindst) && (other.build == null || other.team() == team)){
if(other != null && fire != null && Fires.has(other.x, other.y) && dst <= range * range && (result == null || dst < mindst) && (other.build == null || other.team() == team)){
result = fire;
mindst = dst;
}