mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-01 10:40:38 +03:00
Fixed #12660
This commit is contained in:
@@ -22,4 +22,11 @@ abstract class TargetDummyComp implements Unitc, Healthc{
|
||||
td.dummyHit(amount);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Replace
|
||||
public boolean canLand(){
|
||||
//dummies should always respect the boost config even when the landing area is obstructed (usually by other dummies)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -174,7 +174,8 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
|
||||
/** @return whether there is solid, un-occupied ground under this unit. */
|
||||
public boolean canLand(){
|
||||
return !onSolid() && Units.count(x, y, physicSize(), f -> f != self() && f.isGrounded()) == 0;
|
||||
float psize = physicSize();
|
||||
return !onSolid() && !Units.any(x - psize/2f, y - psize/2f, psize, psize, f -> f != self() && f.isGrounded());
|
||||
}
|
||||
|
||||
public boolean inRange(Position other){
|
||||
|
||||
Reference in New Issue
Block a user