use mapid to decide starting hue for rainbow objects, also use mapid instead of title for direction etc

This commit is contained in:
yugecin 2016-10-01 15:10:20 +02:00
parent 3a507453f9
commit e08d5f2a83
4 changed files with 12 additions and 12 deletions

View File

@ -1183,7 +1183,12 @@ public class Game extends BasicGameState {
Dancer.instance.reset();
Pippi.reset();
MoverDirection.reset(beatmap.getTitle());
MoverDirection.reset(beatmap.beatmapID);
Slider.bpm = beatmap.bpmMin * GameMod.getSpeedMultiplier();
ObjectColorOverrides.reset(beatmap.beatmapID);
CursorColorOverrides.reset(beatmap.beatmapID);
// free all previously cached hitobject to framebuffer mappings if some still exist
FrameBufferCache.getInstance().freeMap();
@ -1230,7 +1235,6 @@ public class Game extends BasicGameState {
// initialize object maps
CursorColorOverrides.comboColors = ObjectColorOverrides.comboColors = beatmap.getComboColors();
ObjectColorOverrides.hue = 0f;
for (int i = 0; i < beatmap.objects.length; i++) {
HitObject hitObject = beatmap.objects[i];
@ -1327,13 +1331,9 @@ public class Game extends BasicGameState {
SoundController.mute(false);
}
Slider.bpm = beatmap.bpmMin * GameMod.getSpeedMultiplier();
mirrorFrom = 0;
mirrorTo = gameObjects.length;
ObjectColorOverrides.reset(beatmap.getTitle());
CursorColorOverrides.reset(beatmap.getTitle());
skipButton.resetHover();
if (isReplay || GameMod.AUTO.isActive())
playbackSpeed.getButton().resetHover();

View File

@ -76,8 +76,8 @@ public enum CursorColorOverrides {
this.nr = nr;
}
public static void reset(String mapname) {
hue = mapname.hashCode() % 360;
public static void reset(int mapID) {
hue = mapID % 360;
}
@Override

View File

@ -59,8 +59,8 @@ public enum MoverDirection {
this.nr = nr;
}
public static void reset(String mapName) {
rand = new Random(mapName.hashCode());
public static void reset(int mapID) {
rand = new Random(mapID);
}
public abstract int getDirection(int currentDirection);

View File

@ -78,8 +78,8 @@ public enum ObjectColorOverrides {
this.nr = nr;
}
public static void reset(String mapname) {
hue = mapname.hashCode() % 360;
public static void reset(int mapID) {
hue = mapID % 360;
}
@Override