mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-28 07:22:21 -08:00
Fixed #2662
This commit is contained in:
parent
3a466475fd
commit
0256a475cf
2 changed files with 6 additions and 2 deletions
|
|
@ -98,7 +98,11 @@ abstract class PayloadComp implements Posc, Rotc, Hitboxc, Unitc{
|
|||
Unit u = payload.unit;
|
||||
|
||||
//can't drop ground units
|
||||
if(((tileOn() == null || tileOn().solid()) && u.elevation < 0.1f) || (!floorOn().isLiquid && u instanceof WaterMovec)){
|
||||
//TODO bad code, solidity should not be handled this way
|
||||
if(
|
||||
((tileOn() == null || tileOn().solid()) && u.elevation < 0.1f && !u.type().allowLegStep) ||
|
||||
(!floorOn().isLiquid && u instanceof WaterMovec) ||
|
||||
(u.type().allowLegStep && EntityCollisions.legsSolid(u.tileX(), u.tileY()))){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public class Build{
|
|||
int wx = dx + offsetx + x, wy = dy + offsety + y;
|
||||
|
||||
Tile check = world.tile(wx, wy);
|
||||
if(check == null || (!check.block.alwaysReplace && check.block != tile.block && !(check.block.size == 1 && type.canReplace(check.block)))) return false;
|
||||
if(check == null || !check.interactable(team) || (!check.block.alwaysReplace && check.block != tile.block && !(check.block.size == 1 && type.canReplace(check.block)))) return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue