Fixes wave being an item turret for some reason

This commit is contained in:
Anuken
2020-05-30 09:06:39 -04:00
parent 9e7a97b780
commit 8d0486d425
4 changed files with 20 additions and 17 deletions

View File

@@ -344,7 +344,7 @@ public abstract class Turret extends Block{
tr.trns(rotation, size * tilesize / 2f, Mathf.range(xRand));
for(int i = 0; i < shots; i++){
bullet(type, rotation + Mathf.range(inaccuracy + type.inaccuracy) + (i - shots / 2f) * spread);
bullet(type, rotation + Mathf.range(inaccuracy + type.inaccuracy) + (i - (int)(shots / 2f)) * spread);
}
}

View File

@@ -79,12 +79,12 @@ public class PayloadAcceptor extends Block{
if(payVector.len() >= size * tilesize/2f){
payVector.clamp(-size * tilesize / 2f, size * tilesize / 2f, -size * tilesize / 2f, size * tilesize / 2f);
Tile front = frontLarge();
if(front != null && front.entity != null && front.block().outputsPayload){
Tilec front = front();
if(front != null && front.block().outputsPayload){
if(movePayload(payload)){
payload = null;
}
}else if(front != null && !front.solid()){
}else if(front != null && !front.tile().solid()){
dumpPayload();
}
}