Skip to content

Commit

Permalink
oopsie
Browse files Browse the repository at this point in the history
  • Loading branch information
Vortex2Oblivion committed Dec 7, 2024
1 parent ef81b2a commit b924d9d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
6 changes: 3 additions & 3 deletions source/game/Note.hx
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,6 @@ class Note extends FlxSkewedSprite {
prevNote.animation.play("hold");


if (Options.getData("useCustomScrollSpeed"))
speed = Options.getData("customScrollSpeed") / PlayState.songMultiplier;

prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * speed;
prevNote.updateHitbox();
prevNote.sustainScaleY = prevNote.scale.y;
Expand Down Expand Up @@ -336,6 +333,9 @@ class Note extends FlxSkewedSprite {
}

@:noCompletion function set_speed(speed:Float):Float {
if(Options.getData("useCustomScrollSpeed")){
speed = Options.getData("customScrollSpeed") / PlayState.songMultiplier;
}
if(isSustainNote && !inEditor && animation != null && !animation?.curAnim?.name?.endsWith('end')){
scale.y = Std.parseFloat(PlayState.instance.ui_settings[0]) * (Std.parseFloat(PlayState.instance.ui_settings[2])
- (Std.parseFloat(PlayState.instance.mania_size[3])));
Expand Down
24 changes: 14 additions & 10 deletions source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ class PlayState extends MusicBeatState {
if (SONG.speed < 0)
SONG.speed = 0;

speed = Options.getData("useCustomScrollSpeed") ? Options.getData("customScrollSpeed") / songMultiplier : SONG.speed;
speed = SONG.speed;

Conductor.recalculateStuff(songMultiplier);
Conductor.safeZoneOffset *= songMultiplier; // makes the game more fair
Expand Down Expand Up @@ -1676,16 +1676,17 @@ class PlayState extends MusicBeatState {
for (susNote in 0...Math.floor(swagNote.sustainLength / Std.int(Conductor.stepCrochet))) {
oldNote = unspawnNotes[unspawnNotes.length - 1];

var sustainNote:Note = new Note(daStrumTime + (Conductor.stepCrochet * susNote) + (Conductor.stepCrochet / FlxMath.roundDecimal(speed,
2)), noteData, oldNote, true,
var sustainNote:Note = new Note(daStrumTime + (Conductor.stepCrochet * susNote) + (Conductor.stepCrochet / (Options.getData("downscroll") ? 1 :FlxMath.roundDecimal(speed,
2))), noteData, oldNote, true,
char, songNotes[4], null, chars, gottaHitNote);
sustainNote.scrollFactor.set();
unspawnNotes.push(sustainNote);

sustainNote.mustPress = gottaHitNote;

sustainGroup.push(sustainNote);
sustainNote.sustains = sustainGroup;
sustainNote.scrollFactor.set();
unspawnNotes.push(sustainNote);

sustainNote.mustPress = gottaHitNote;

sustainGroup.push(sustainNote);
sustainNote.sustains = sustainGroup;
}
}

swagNote.sustains = sustainGroup;
Expand Down Expand Up @@ -4388,6 +4389,9 @@ class PlayState extends MusicBeatState {
}

@:noCompletion function set_speed(speed:Float):Float {
if(Options.getData("useCustomScrollSpeed")){
speed = Options.getData("customScrollSpeed") / songMultiplier;
}
if (notes?.members != null && unspawnNotes != null) {
for (note in notes.members) {
note.speed = speed;
Expand Down

0 comments on commit b924d9d

Please sign in to comment.