mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-02-07 16:02:16 -08:00
Fixed teleporter loop crash
This commit is contained in:
parent
39db04872c
commit
fb97d00756
3 changed files with 4 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#Autogenerated file. Do not modify.
|
||||
#Sun Feb 18 11:33:00 EST 2018
|
||||
#Sun Feb 18 12:25:44 EST 2018
|
||||
version=beta
|
||||
androidBuildCode=235
|
||||
androidBuildCode=236
|
||||
name=Mindustry
|
||||
code=3.3
|
||||
build=custom build
|
||||
|
|
|
|||
|
|
@ -163,10 +163,6 @@ public class Conveyor extends Block{
|
|||
long result = ItemPos.packItem(item, y*0.9f, pos, (byte)Mathf.random(255));
|
||||
boolean inserted = false;
|
||||
|
||||
if(pos <= 0.00001f && entity.minitem <= 0.001f){
|
||||
return; //TODO low fps stacked items: what now?
|
||||
}
|
||||
|
||||
for(int i = 0; i < entity.convey.size; i ++){
|
||||
if(compareItems(result, entity.convey.get(i)) < 0){
|
||||
entity.convey.insert(i, result);
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ public class Teleporter extends PowerBlock{
|
|||
solid = true;
|
||||
health = 80;
|
||||
powerCapacity = 30f;
|
||||
instantTransfer = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -155,7 +156,7 @@ public class Teleporter extends PowerBlock{
|
|||
public boolean available(Tile tile, Item item){
|
||||
for(int i = 0; i < 4; i ++){
|
||||
Tile next = tile.getNearby(i);
|
||||
if(next != null && next.block().acceptItem(item, next, tile)){
|
||||
if(next != null && !(next.block().instantTransfer) && next.block().acceptItem(item, next, tile)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue