Skip to content

Commit

Permalink
Merge pull request #9 from None1637/Fixed_bugs
Browse files Browse the repository at this point in the history
Fixed bugs
  • Loading branch information
EdrowsLuo authored May 30, 2020
2 parents 0ca56ce + 0713117 commit 90552cf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ru/nsu/ccfit/zuev/osu/game/GameScene.java
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,14 @@ private boolean loadGame(final TrackInfo track, final String rFile) {
scale += 0.125f;
drain *= 0.5f;
overallDifficulty *= 0.5f;
approachRate = (float) ((ModMenu.getInstance().getMod().contains(GameMod.MOD_DOUBLETIME) || ModMenu.getInstance().getMod().contains(GameMod.MOD_NIGHTCORE))?
(GameHelper.ar2ms(rawApproachRate - 1f) / 1000f):(GameHelper.ar2ms(rawApproachRate - 0.5f) / 1000f));
if(ModMenu.getInstance().getMod().contains(GameMod.MOD_HARDROCK)){
approachRate = (float) ((ModMenu.getInstance().getMod().contains(GameMod.MOD_DOUBLETIME) || ModMenu.getInstance().getMod().contains(GameMod.MOD_NIGHTCORE))?
(GameHelper.ar2ms(Math.min(1.4f * rawApproachRate, 10f) - 1f) / 1000f):(GameHelper.ar2ms(Math.min(1.4f * rawApproachRate, 10f) - 0.5f) / 1000f));
}
else{
approachRate = (float) ((ModMenu.getInstance().getMod().contains(GameMod.MOD_DOUBLETIME) || ModMenu.getInstance().getMod().contains(GameMod.MOD_NIGHTCORE))?
(GameHelper.ar2ms(rawApproachRate - 1f) / 1000f):(GameHelper.ar2ms(rawApproachRate - 0.5f) / 1000f));
}
}

if (ModMenu.getInstance().getMod().contains(GameMod.MOD_SMALLCIRCLE)) {
Expand Down
10 changes: 10 additions & 0 deletions src/ru/nsu/ccfit/zuev/osu/menu/SongMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,9 @@ public void changeDimensionInfo(TrackInfo track) {
}
//added by hao1637
if (mod.contains(GameMod.MOD_REALLYEASY)) {
if(mod.contains(GameMod.MOD_EASY)){
ar *= 2f;
}
ar -= 0.5f;
if(mod.contains(GameMod.MOD_DOUBLETIME) | mod.contains(GameMod.MOD_NIGHTCORE)){
ar -= 0.5f;
Expand All @@ -908,6 +911,13 @@ public void changeDimensionInfo(TrackInfo track) {
String binfoStr = String.format(StringTable.get(R.string.binfoStr1), sdf.format(length),
(bpm_min == bpm_max ? GameHelper.Round(bpm_min, 1) : GameHelper.Round(bpm_min, 1) + "-" + GameHelper.Round(bpm_max, 1)),
track.getMaxCombo());
if(length > 3600 * 1000){
sdf = new SimpleDateFormat("HH:mm:ss");
sdf.setTimeZone(TimeZone.getTimeZone("GMT+0"));
binfoStr = String.format(StringTable.get(R.string.binfoStr1), sdf.format(length),
(bpm_min == bpm_max ? GameHelper.Round(bpm_min, 1) : GameHelper.Round(bpm_min, 1) + "-" + GameHelper.Round(bpm_max, 1)),
track.getMaxCombo());
}
beatmapInfo.setText(binfoStr);

final StringBuilder dimensionStringBuilder = new StringBuilder();
Expand Down

0 comments on commit 90552cf

Please sign in to comment.