diff --git a/core/src/mindustry/entities/comp/PayloadComp.java b/core/src/mindustry/entities/comp/PayloadComp.java index 99c6b84f87..75bc07c21e 100644 --- a/core/src/mindustry/entities/comp/PayloadComp.java +++ b/core/src/mindustry/entities/comp/PayloadComp.java @@ -122,7 +122,7 @@ abstract class PayloadComp implements Posc, Rotc, Hitboxc, Unitc{ Building tile = payload.entity; int tx = Vars.world.toTile(x - tile.block.offset), ty = Vars.world.toTile(y - tile.block.offset); Tile on = Vars.world.tile(tx, ty); - if(on != null && Build.validPlace(tile.block, tile.team, tx, ty, tile.rotation)){ + if(on != null && Build.validPlace(tile.block, tile.team, tx, ty, tile.rotation, false)){ int rot = (int)((rotation + 45f) / 90f) % 4; payload.place(on, rot); diff --git a/core/src/mindustry/world/Build.java b/core/src/mindustry/world/Build.java index d0729f380f..15c7decbcf 100644 --- a/core/src/mindustry/world/Build.java +++ b/core/src/mindustry/world/Build.java @@ -68,8 +68,13 @@ public class Build{ /** Returns whether a tile can be placed at this location by this team. */ public static boolean validPlace(Block type, Team team, int x, int y, int rotation){ + return validPlace(type, team, x, y, rotation, true); + } + + /** Returns whether a tile can be placed at this location by this team. */ + public static boolean validPlace(Block type, Team team, int x, int y, int rotation, boolean checkVisible){ //the wave team can build whatever they want as long as it's visible - banned blocks are not applicable - if(type == null || (!type.isPlaceable() && !(state.rules.waves && team == state.rules.waveTeam && type.isVisible()))){ + if(type == null || (checkVisible && (!type.isPlaceable() && !(state.rules.waves && team == state.rules.waveTeam && type.isVisible())))){ return false; }