Added missing synchronized block
This commit is contained in:
@@ -46,6 +46,8 @@ public class TeslaOrb extends Entity{
|
||||
|
||||
Array<SolidEntity> enemies = Entities.getNearby(enemyGroup, curx, cury, range*2f);
|
||||
|
||||
synchronized (Entities.entityLock) {
|
||||
|
||||
for (SolidEntity entity : enemies) {
|
||||
if (entity != null && entity.distanceTo(curx, cury) < range && !hit.contains((Enemy) entity)) {
|
||||
hit.add((Enemy) entity);
|
||||
@@ -57,6 +59,7 @@ public class TeslaOrb extends Entity{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(points.size == 0){
|
||||
remove();
|
||||
|
||||
Reference in New Issue
Block a user