Fixed bugs with Hard Rock mod and replays during breaks.
- Hard Rock now flips hit object coordinates along the x axis, as in osu!. - Fixed a bug where replay data wasn't being shown during breaks. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
parent
49c85b3b08
commit
a19eb39259
|
@ -59,6 +59,9 @@ public class OsuHitObject {
|
||||||
xOffset, // offset right of border
|
xOffset, // offset right of border
|
||||||
yOffset; // offset below health bar
|
yOffset; // offset below health bar
|
||||||
|
|
||||||
|
/** The container height. */
|
||||||
|
private static int containerHeight;
|
||||||
|
|
||||||
/** Starting coordinates. */
|
/** Starting coordinates. */
|
||||||
private float x, y;
|
private float x, y;
|
||||||
|
|
||||||
|
@ -107,6 +110,7 @@ public class OsuHitObject {
|
||||||
* @param height the container height
|
* @param height the container height
|
||||||
*/
|
*/
|
||||||
public static void init(int width, int height) {
|
public static void init(int width, int height) {
|
||||||
|
containerHeight = height;
|
||||||
int swidth = width;
|
int swidth = width;
|
||||||
int sheight = height;
|
int sheight = height;
|
||||||
if (swidth * 3 > sheight * 4)
|
if (swidth * 3 > sheight * 4)
|
||||||
|
@ -238,7 +242,12 @@ public class OsuHitObject {
|
||||||
/**
|
/**
|
||||||
* Returns the scaled starting y coordinate.
|
* Returns the scaled starting y coordinate.
|
||||||
*/
|
*/
|
||||||
public float getScaledY() { return y * yMultiplier + yOffset; }
|
public float getScaledY() {
|
||||||
|
if (GameMod.HARD_ROCK.isActive())
|
||||||
|
return containerHeight - (y * yMultiplier + yOffset);
|
||||||
|
else
|
||||||
|
return y * yMultiplier + yOffset;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the start time.
|
* Returns the start time.
|
||||||
|
@ -309,8 +318,13 @@ public class OsuHitObject {
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
float[] y = new float[sliderY.length];
|
float[] y = new float[sliderY.length];
|
||||||
for (int i = 0; i < y.length; i++)
|
if (GameMod.HARD_ROCK.isActive()) {
|
||||||
y[i] = sliderY[i] * yMultiplier + yOffset;
|
for (int i = 0; i < y.length; i++)
|
||||||
|
y[i] = containerHeight - (sliderY[i] * yMultiplier + yOffset);
|
||||||
|
} else {
|
||||||
|
for (int i = 0; i < y.length; i++)
|
||||||
|
y[i] = sliderY[i] * yMultiplier + yOffset;
|
||||||
|
}
|
||||||
return y;
|
return y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -303,7 +303,10 @@ public class Game extends BasicGameState {
|
||||||
|
|
||||||
if (GameMod.AUTO.isActive())
|
if (GameMod.AUTO.isActive())
|
||||||
GameImage.UNRANKED.getImage().drawCentered(width / 2, height * 0.077f);
|
GameImage.UNRANKED.getImage().drawCentered(width / 2, height * 0.077f);
|
||||||
UI.draw(g);
|
if (!isReplay)
|
||||||
|
UI.draw(g);
|
||||||
|
else
|
||||||
|
UI.draw(g, replayX, replayY, replayKeyPressed);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user