Skip to content
This repository was archived by the owner on Oct 18, 2025. It is now read-only.

Commit 22d3bfb

Browse files
Downscroll Fix
1 parent 2d4d13c commit 22d3bfb

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

source/funkin/visuals/game/Note.hx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,9 @@ class Note extends FlxSprite
110110
flipY = noteType == SUSTAIN_END && ClientPrefs.data.downScroll;
111111

112112
antialiasing = ClientPrefs.data.antialiasing;
113-
114-
animation.play('idle', true);
115113
}
116114

117-
public static function setNotePosition(note:FlxSprite, target:FlxSprite, angle:Float, offsetX:Float, offsetY:Float)
115+
public static inline function setNotePosition(note:FlxSprite, target:FlxSprite, angle:Float, offsetX:Float, offsetY:Float)
118116
{
119117
offsetX += target.width / 2 - note.width / 2;
120118

@@ -189,5 +187,7 @@ class Note extends FlxSprite
189187
setMeta(data, noteType);
190188

191189
active = true;
190+
191+
flipY = noteType == SUSTAIN_END && ClientPrefs.data.downScroll;
192192
}
193193
}

source/funkin/visuals/game/StrumLine.hx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class StrumLine extends FlxGroup
2020

2121
public var splashes:FlxTypedGroup<Splash>;
2222

23-
public var downScroll:Bool = false;
23+
private var downScroll:Bool = ClientPrefs.data.downScroll;
2424

2525
public var scrollSpeed:Float = 1;
2626

@@ -51,8 +51,6 @@ class StrumLine extends FlxGroup
5151

5252
this.character = character;
5353

54-
this.downScroll = ClientPrefs.data.downScroll;
55-
5654
botplay = this.character.type != PLAYER;
5755

5856
add(strums = new FlxTypedGroup<Strum>());
@@ -144,7 +142,7 @@ class StrumLine extends FlxGroup
144142
{
145143
var strum:Strum = strums.members[note.data];
146144

147-
Note.setNotePosition(note, strum, strum.direction, 0, (note.strumTime - Conductor.songPosition) * scrollSpeed * 0.45 * (ClientPrefs.data.downScroll ? -1 : 1));
145+
Note.setNotePosition(note, strum, strum.direction, 0, (note.strumTime - Conductor.songPosition) * scrollSpeed * 0.45 * (downScroll ? -1 : 1));
148146

149147
if (botplay)
150148
{
@@ -161,7 +159,7 @@ class StrumLine extends FlxGroup
161159

162160
var strum:Strum = strums.members[sustain.data];
163161

164-
Note.setNotePosition(sustain, strum, strum.direction, 0, strum.height / 2 + (sustain.strumTime - Conductor.songPosition) * scrollSpeed * 0.45 * (ClientPrefs.data.downScroll ? -1 : 1));
162+
Note.setNotePosition(sustain, strum, strum.direction, 0, (downScroll ? -1 : 1) * strum.height / 2 + (sustain.strumTime - Conductor.songPosition) * scrollSpeed * 0.45 * (downScroll ? -1 : 1));
165163

166164
/*
167165
var parent = sustain.parentNote;
@@ -357,11 +355,12 @@ class StrumLine extends FlxGroup
357355
{
358356
result = notePool.pop();
359357
result.resetNote(time, data, length, variant, type);
360-
result.active = true;
361358
} else {
362359
result = new Note(time, data, length, variant, character.type, type);
363360
}
364361

362+
result.updateHitbox();
363+
365364
result.character = this.character;
366365

367366
return result;

0 commit comments

Comments
 (0)