Fixed some more synchronization bugs
This commit is contained in:
@@ -24,7 +24,7 @@ allprojects {
|
|||||||
appName = 'Mindustry'
|
appName = 'Mindustry'
|
||||||
gdxVersion = '1.9.8'
|
gdxVersion = '1.9.8'
|
||||||
aiVersion = '1.8.1'
|
aiVersion = '1.8.1'
|
||||||
uCoreVersion = 'd66ebb6'
|
uCoreVersion = 'a95630d'
|
||||||
|
|
||||||
getVersionString = {
|
getVersionString = {
|
||||||
String buildVersion = getBuildVersion()
|
String buildVersion = getBuildVersion()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#Autogenerated file. Do not modify.
|
#Autogenerated file. Do not modify.
|
||||||
#Mon Feb 19 14:44:36 EST 2018
|
#Mon Feb 19 14:45:40 EST 2018
|
||||||
version=beta
|
version=beta
|
||||||
androidBuildCode=245
|
androidBuildCode=245
|
||||||
name=Mindustry
|
name=Mindustry
|
||||||
|
|||||||
@@ -98,14 +98,16 @@ public abstract class InputHandler extends InputAdapter{
|
|||||||
Vector2 offset = type.getPlaceOffset();
|
Vector2 offset = type.getPlaceOffset();
|
||||||
rect.setCenter(offset.x + x * tilesize, offset.y + y * tilesize);
|
rect.setCenter(offset.x + x * tilesize, offset.y + y * tilesize);
|
||||||
|
|
||||||
for(SolidEntity e : Entities.getNearby(enemyGroup, x * tilesize, y * tilesize, tilesize * 2f)){
|
synchronized (Entities.entityLock) {
|
||||||
if(e == null) continue; //not sure why this happens?
|
for (SolidEntity e : Entities.getNearby(enemyGroup, x * tilesize, y * tilesize, tilesize * 2f)) {
|
||||||
|
if (e == null) continue; //not sure why this happens?
|
||||||
Rectangle rect = e.hitbox.getRect(e.x, e.y);
|
Rectangle rect = e.hitbox.getRect(e.x, e.y);
|
||||||
|
|
||||||
if(this.rect.overlaps(rect)){
|
if (this.rect.overlaps(rect)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(type.solid || type.solidifes) {
|
if(type.solid || type.solidifes) {
|
||||||
for (Player player : playerGroup.all()) {
|
for (Player player : playerGroup.all()) {
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ public class Tile{
|
|||||||
|
|
||||||
/**Returns the list of all tiles linked to this multiblock, or an empty array if it's not a multiblock.
|
/**Returns the list of all tiles linked to this multiblock, or an empty array if it's not a multiblock.
|
||||||
* This array contains all linked tiles, including this tile itself.*/
|
* This array contains all linked tiles, including this tile itself.*/
|
||||||
public Array<Tile> getLinkedTiles(){
|
public synchronized Array<Tile> getLinkedTiles(){
|
||||||
Block block = block();
|
Block block = block();
|
||||||
tmpArray.clear();
|
tmpArray.clear();
|
||||||
if(!(block.width == 1 && block.height == 1)){
|
if(!(block.width == 1 && block.height == 1)){
|
||||||
|
|||||||
Reference in New Issue
Block a user