v0.9.3: reverted gamescene tag changes, resulted in deadlocks

This commit is contained in:
Evan Debenham 2021-06-05 21:15:04 -04:00
parent c277f6b50c
commit cb5c76893d
2 changed files with 12 additions and 8 deletions

View File

@ -683,26 +683,29 @@ public class GameScene extends PixelScene {
float pos = scene.toolbar.top();
scene.attack.setPos( tagLeft, pos - scene.attack.height());
scene.attack.flip(tagLeft == 0);
//FIXME adjusting this to position even without visibility resulted in deadlocks
if (scene.tagAttack){
scene.attack.setPos( tagLeft, pos - scene.attack.height());
scene.attack.flip(tagLeft == 0);
pos = scene.attack.top();
}
scene.loot.setPos( tagLeft, pos - scene.loot.height() );
scene.loot.flip(tagLeft == 0);
if (scene.tagLoot) {
scene.loot.setPos( tagLeft, pos - scene.loot.height() );
scene.loot.flip(tagLeft == 0);
pos = scene.loot.top();
}
scene.action.setPos( tagLeft, pos - scene.action.height() );
scene.action.flip(tagLeft == 0);
if (scene.tagAction) {
scene.action.setPos( tagLeft, pos - scene.action.height() );
scene.action.flip(tagLeft == 0);
pos = scene.action.top();
}
scene.resume.setPos( tagLeft, pos - scene.resume.height() );
scene.resume.flip(tagLeft == 0);
if (scene.tagResume) {
scene.resume.setPos(tagLeft, pos - scene.resume.height());
scene.resume.flip(tagLeft == 0);
}
}
@Override

View File

@ -33,6 +33,7 @@ import com.watabou.utils.Random;
import java.util.ArrayList;
//FIXME needs a refactor, lots of weird thread interaction here.
public class AttackIndicator extends Tag {
private static final float ENABLED = 1.0f;