diff --git a/core/src/io/anuke/mindustry/core/Renderer.java b/core/src/io/anuke/mindustry/core/Renderer.java index 79e12d9987..e16b96770d 100644 --- a/core/src/io/anuke/mindustry/core/Renderer.java +++ b/core/src/io/anuke/mindustry/core/Renderer.java @@ -197,6 +197,10 @@ public class Renderer extends RendererModule{ @Override public void draw(){ camera.update(); + if(Float.isNaN(Core.camera.position.x) || Float.isNaN(Core.camera.position.y)){ + Core.camera.position.x = players[0].x; + Core.camera.position.y = players[0].y; + } Graphics.clear(clearColor); diff --git a/core/src/io/anuke/mindustry/world/BaseBlock.java b/core/src/io/anuke/mindustry/world/BaseBlock.java index cbb50bab1a..bed335562e 100644 --- a/core/src/io/anuke/mindustry/world/BaseBlock.java +++ b/core/src/io/anuke/mindustry/world/BaseBlock.java @@ -274,7 +274,7 @@ public abstract class BaseBlock{ /** Try offloading an item to a nearby container in its facing direction. Returns true if success.*/ public boolean offloadDir(Tile tile, Item item){ Tile other = tile.getNearby(tile.getRotation()); - if(other != null && other.getTeamID() == tile.getTeamID() && other.block().acceptItem(item, other, tile)){ + if(other != null && other.target().getTeamID() == tile.getTeamID() && other.block().acceptItem(item, other, tile)){ other.block().handleItem(item, other, tile); return true; }