Skip to content

Commit

Permalink
Fixed multiblocks not accepting items
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed Aug 15, 2018
1 parent 14c526d commit c569232
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions core/src/io/anuke/mindustry/core/Renderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ public void update(){
@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);

Expand Down
2 changes: 1 addition & 1 deletion core/src/io/anuke/mindustry/world/BaseBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public boolean canDump(Tile tile, Tile to, Item item){
/** 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;
}
Expand Down

0 comments on commit c569232

Please sign in to comment.