v0.8.2: Various stability improvements/fixes:
- fixed concurrency errrors in Sample.java - added a null safety check to IconTitle - fixed further rare freezing errors with tengu jumping - reverted Android 'singleInstance' change, due to stability issues
This commit is contained in:
parent
a2b4e3a9b6
commit
2478e18ba6
|
@ -35,7 +35,7 @@ public enum Sample {
|
|||
private boolean enabled = true;
|
||||
private float globalVolume = 1f;
|
||||
|
||||
public void reset() {
|
||||
public synchronized void reset() {
|
||||
|
||||
for (Sound sound : ids.values()){
|
||||
sound.dispose();
|
||||
|
@ -45,13 +45,13 @@ public enum Sample {
|
|||
|
||||
}
|
||||
|
||||
public void pause() {
|
||||
public synchronized void pause() {
|
||||
for (Sound sound : ids.values()) {
|
||||
sound.pause();
|
||||
}
|
||||
}
|
||||
|
||||
public void resume() {
|
||||
public synchronized void resume() {
|
||||
for (Sound sound : ids.values()) {
|
||||
sound.resume();
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public enum Sample {
|
|||
|
||||
}
|
||||
|
||||
public void unload( Object src ) {
|
||||
public synchronized void unload( Object src ) {
|
||||
if (ids.containsKey( src )) {
|
||||
ids.get( src ).dispose();
|
||||
ids.remove( src );
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
android:label="${appName}"
|
||||
android:theme="@android:style/Theme.Black.NoTitleBar"
|
||||
android:resizeableActivity="true"
|
||||
android:launchMode="singleInstance"
|
||||
android:allowBackup="true"
|
||||
android:fullBackupOnly="true"
|
||||
android:backupAgent=".AndroidBackupHandler">
|
||||
|
|
|
@ -241,13 +241,17 @@ public class NewTengu extends Mob {
|
|||
if (level.state() == NewPrisonBossLevel.State.FIGHT_START) {
|
||||
|
||||
level.cleanTenguCell();
|
||||
|
||||
|
||||
int tries = 100;
|
||||
do {
|
||||
newPos = ((NewPrisonBossLevel)Dungeon.level).randomTenguCellPos();
|
||||
} while ( level.trueDistance(newPos, enemy.pos) <= 3.5f
|
||||
tries--;
|
||||
} while ( tries > 0 && (level.trueDistance(newPos, enemy.pos) <= 3.5f
|
||||
|| level.trueDistance(newPos, Dungeon.hero.pos) <= 3.5f
|
||||
|| Actor.findChar(newPos) != null);
|
||||
|
||||
|| Actor.findChar(newPos) != null));
|
||||
|
||||
if (tries <= 0) newPos = pos;
|
||||
|
||||
if (level.heroFOV[pos]) CellEmitter.get( pos ).burst( Speck.factory( Speck.WOOL ), 6 );
|
||||
|
||||
sprite.move( pos, newPos );
|
||||
|
|
|
@ -109,8 +109,10 @@ public class IconTitle extends Component {
|
|||
}
|
||||
|
||||
public void icon( Image icon ) {
|
||||
remove( imIcon );
|
||||
add( imIcon = icon );
|
||||
if (icon != null) {
|
||||
remove(imIcon);
|
||||
add(imIcon = icon);
|
||||
}
|
||||
}
|
||||
|
||||
public void label( String label ) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user