mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-13 12:16:53 +07:00
Fix small linecast issue (#5192)
This commit is contained in:
parent
0193d586d1
commit
d820e7d31a
@ -266,8 +266,8 @@ public class Damage{
|
|||||||
});
|
});
|
||||||
|
|
||||||
if(tmpBuilding != null && tmpUnit != null){
|
if(tmpBuilding != null && tmpUnit != null){
|
||||||
if(Mathf.dst2(x, y, tmpUnit.getX(), tmpUnit.getY()) <= Mathf.dst2(x, y, tmpBuilding.getX(), tmpBuilding.getY())){
|
if(Mathf.dst2(x, y, tmpBuilding.getX(), tmpBuilding.getY()) <= Mathf.dst2(x, y, tmpUnit.getX(), tmpUnit.getY())){
|
||||||
return tmpUnit;
|
return tmpBuilding;
|
||||||
}
|
}
|
||||||
}else if(tmpBuilding != null){
|
}else if(tmpBuilding != null){
|
||||||
return tmpBuilding;
|
return tmpBuilding;
|
||||||
|
Loading…
Reference in New Issue
Block a user