This commit is contained in:
Anuken 2020-09-22 13:38:08 -04:00
parent 3a466475fd
commit 0256a475cf
2 changed files with 6 additions and 2 deletions

View file

@ -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;
}

View file

@ -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;
}
}
}