mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-10 18:57:39 +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(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;
|
||||
|
Loading…
Reference in New Issue
Block a user