mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 03:08:38 +07:00
Crash fixes
This commit is contained in:
parent
ba46dacfdc
commit
2a41453bc8
@ -1,7 +1,7 @@
|
||||
#Autogenerated file. Do not modify.
|
||||
#Sat Mar 03 01:13:15 EST 2018
|
||||
#Sat Mar 03 11:31:02 EST 2018
|
||||
version=release
|
||||
androidBuildCode=328
|
||||
androidBuildCode=330
|
||||
name=Mindustry
|
||||
code=3.4
|
||||
build=29
|
||||
build=custom build
|
||||
|
@ -27,7 +27,7 @@ public class ThreadHandler {
|
||||
public ThreadHandler(ThreadProvider impl){
|
||||
this.impl = impl;
|
||||
|
||||
Timers.setDeltaProvider(() ->{
|
||||
Timers.setDeltaProvider(() -> {
|
||||
float result = impl.isOnThread() ? delta : Gdx.graphics.getDeltaTime()*60f;
|
||||
return Math.min(Float.isNaN(result) ? 1f : result, 12f);
|
||||
});
|
||||
|
@ -124,6 +124,8 @@ public class UI extends SceneModule{
|
||||
@Override
|
||||
public synchronized void update(){
|
||||
if(Vars.debug && !Vars.showUI) return;
|
||||
|
||||
if(Graphics.drawing()) Graphics.end();
|
||||
|
||||
scene.act();
|
||||
scene.draw();
|
||||
|
@ -240,7 +240,7 @@ public class World extends Module{
|
||||
if(!tile.block().isMultiblock() && !tile.isLinked()){
|
||||
tile.setBlock(Blocks.air);
|
||||
}else{
|
||||
Tile target = tile.isLinked() ? tile.getLinked() : tile;
|
||||
Tile target = tile.target();
|
||||
Array<Tile> removals = target.getLinkedTiles();
|
||||
for(Tile toremove : removals){
|
||||
//note that setting a new block automatically unlinks it
|
||||
|
@ -47,7 +47,7 @@ public class TeslaOrb extends Entity{
|
||||
Array<SolidEntity> enemies = Entities.getNearby(enemyGroup, curx, cury, range*2f);
|
||||
|
||||
for(SolidEntity entity : enemies){
|
||||
if(entity.distanceTo(curx, cury) < range && !hit.contains((Enemy)entity)){
|
||||
if(entity != null && entity.distanceTo(curx, cury) < range && !hit.contains((Enemy)entity)){
|
||||
hit.add((Enemy)entity);
|
||||
points.add(new Vector2(entity.x + Mathf.range(shake), entity.y + Mathf.range(shake)));
|
||||
damageEnemy((Enemy)entity);
|
||||
|
@ -70,9 +70,9 @@ public class Sorter extends Block{
|
||||
}else{
|
||||
Tile a = dest.getNearby(Mathf.mod(dir - 1, 4));
|
||||
Tile b = dest.getNearby(Mathf.mod(dir + 1, 4));
|
||||
boolean ac = !(a.block().instantTransfer && source.block().instantTransfer) &&
|
||||
boolean ac = a != null && !(a.block().instantTransfer && source.block().instantTransfer) &&
|
||||
a.block().acceptItem(item, a, dest);
|
||||
boolean bc = !(b.block().instantTransfer && source.block().instantTransfer) &&
|
||||
boolean bc = b != null && !(b.block().instantTransfer && source.block().instantTransfer) &&
|
||||
b.block().acceptItem(item, b, dest);
|
||||
|
||||
if(ac && !bc){
|
||||
|
Loading…
Reference in New Issue
Block a user