From 0256a475cff5bc015f469faeeaf09f99bcbc12d2 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 22 Sep 2020 13:38:08 -0400 Subject: [PATCH] Fixed #2662 --- core/src/mindustry/entities/comp/PayloadComp.java | 6 +++++- core/src/mindustry/world/Build.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/entities/comp/PayloadComp.java b/core/src/mindustry/entities/comp/PayloadComp.java index ddb3d191d8..72829cea81 100644 --- a/core/src/mindustry/entities/comp/PayloadComp.java +++ b/core/src/mindustry/entities/comp/PayloadComp.java @@ -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; } diff --git a/core/src/mindustry/world/Build.java b/core/src/mindustry/world/Build.java index 43421f7f2f..7f9182a211 100644 --- a/core/src/mindustry/world/Build.java +++ b/core/src/mindustry/world/Build.java @@ -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; } } }