Skip to content

Commit

Permalink
Fixed broken "Easy" mod.
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
  • Loading branch information
itdelatrisu committed Sep 3, 2015
1 parent a2eaf35 commit e767800
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/itdelatrisu/opsu/beatmap/BeatmapSetNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void draw(float x, float y, Grade grade, boolean focus) {
Image star = GameImage.STAR.getImage();
float starOffset = star.getWidth() * 1.7f;
float starX = cx + starOffset * 0.04f;
float starY = cy + Fonts.MEDIUM.getLineHeight() + Fonts.DEFAULT.getLineHeight() * 2 - 10f * GameImage.getUIscale();
float starY = cy + Fonts.MEDIUM.getLineHeight() + Fonts.DEFAULT.getLineHeight() * 2 - 8f * GameImage.getUIscale();
float starCenterY = starY + star.getHeight() / 2f;
final float baseAlpha = focus ? 1f : 0.8f;
final float smallStarScale = 0.4f;
Expand Down
21 changes: 11 additions & 10 deletions src/itdelatrisu/opsu/states/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,17 @@ else if (!container.hasFocus()) {
return;
}

// "Easy" mod: multiple "lives"
if (GameMod.EASY.isActive() && deathTime > -1) {
if (data.getHealth() < 99f) {
data.changeHealth(delta / 10f);
data.updateDisplays(delta);
return;
}
MusicController.resume();
deathTime = -1;
}

// normal game update
if (!isReplay)
addReplayFrameAndRun(mouseX, mouseY, lastKeysPressed, trackPosition);
Expand Down Expand Up @@ -706,16 +717,6 @@ else if (!container.hasFocus()) {
* @param keys the keys that are pressed
*/
private void updateGame(int mouseX, int mouseY, int delta, int trackPosition, int keys) {
// "Easy" mod: multiple "lives"
if (GameMod.EASY.isActive() && deathTime > -1) {
if (data.getHealth() < 99f)
data.changeHealth(delta / 10f);
else {
MusicController.resume();
deathTime = -1;
}
}

// map complete!
if (objectIndex >= gameObjects.length || (MusicController.trackEnded() && objectIndex > 0)) {
// track ended before last object was processed: force a hit result
Expand Down

0 comments on commit e767800

Please # to comment.