try to fix an issue with sanity/insanity interactions
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user