try to fix an issue with sanity/insanity interactions

This commit is contained in:
2026-05-18 19:46:53 +02:00
parent e9eaa10474
commit 83ebfddde8
2 changed files with 9 additions and 16 deletions
@@ -47,17 +47,11 @@ public class TempoCapability implements ITempo {
}
public void setBonusMaxTempo(float bonusMaxTempo) {
int oldMax = getMaxTempo();
this.bonusMaxTempo = Math.max(0f, bonusMaxTempo);
int newMax = getMaxTempo();
if (oldMax > 0) {
float pct = (float) tempo / (float) oldMax;
tempo = Math.round(pct * newMax);
}
setTempo(tempo);
setTempo(this.tempo);
}
public float getBonusMaxTempo() {
return bonusMaxTempo;
}
}
}