Fix small linecast issue (#5192)

This commit is contained in:
MEEP of Faith
2021-05-03 22:10:36 -04:00
committed by GitHub
parent 0193d586d1
commit d820e7d31a
+2 -2
View File
@@ -266,8 +266,8 @@ public class Damage{
});
if(tmpBuilding != null && tmpUnit != null){
if(Mathf.dst2(x, y, tmpUnit.getX(), tmpUnit.getY()) <= Mathf.dst2(x, y, tmpBuilding.getX(), tmpBuilding.getY())){
return tmpUnit;
if(Mathf.dst2(x, y, tmpBuilding.getX(), tmpBuilding.getY()) <= Mathf.dst2(x, y, tmpUnit.getX(), tmpUnit.getY())){
return tmpBuilding;
}
}else if(tmpBuilding != null){
return tmpBuilding;