Fixed 32-bit version not working due to Discord integration
This commit is contained in:
@@ -378,6 +378,5 @@ public class Control extends Module{
|
||||
Timers.update();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ public class TileEntity extends Entity{
|
||||
|
||||
@Override
|
||||
public void update(){
|
||||
synchronized (tile) {
|
||||
synchronized (Tile.tileSetLock) {
|
||||
if (health != 0 && health < tile.block().health && !(tile.block() instanceof Wall) &&
|
||||
Mathf.chance(0.009f * Timers.delta() * (1f - health / tile.block().health))) {
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import static io.anuke.mindustry.Vars.world;
|
||||
|
||||
|
||||
public class Tile{
|
||||
public static final Object tileSetLock = new Object();
|
||||
private static final Array<Tile> tmpArray = new Array<>();
|
||||
|
||||
/**Packed block data. Left is floor, right is block.*/
|
||||
@@ -120,18 +121,21 @@ public class Tile{
|
||||
}
|
||||
|
||||
public void setBlock(Block type, int rotation){
|
||||
if(rotation < 0) rotation = (-rotation + 2);
|
||||
rotation %= 4;
|
||||
iSetBlock(type);
|
||||
setRotation((byte)rotation);
|
||||
this.link = 0;
|
||||
changed();
|
||||
synchronized (tileSetLock) {
|
||||
if(rotation < 0) rotation = (-rotation + 2);
|
||||
iSetBlock(type);
|
||||
setRotation((byte) (rotation % 4));
|
||||
this.link = 0;
|
||||
changed();
|
||||
}
|
||||
}
|
||||
|
||||
public void setBlock(Block type){
|
||||
iSetBlock(type);
|
||||
this.link = 0;
|
||||
changed();
|
||||
synchronized (tileSetLock) {
|
||||
iSetBlock(type);
|
||||
this.link = 0;
|
||||
changed();
|
||||
}
|
||||
}
|
||||
|
||||
public void setFloor(Block type){
|
||||
@@ -260,7 +264,7 @@ public class Tile{
|
||||
}
|
||||
|
||||
public void changed(){
|
||||
synchronized (this) {
|
||||
synchronized (tileSetLock) {
|
||||
if (entity != null) {
|
||||
entity.remove();
|
||||
entity = null;
|
||||
|
||||
Reference in New Issue
Block a user