Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Fix for strange ChartingState hitsounds offset, i hope #3081

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[BUGFIX] Fix for strange ChartingState hitsounds offset, i hope
  • Loading branch information
PurSnake authored Aug 1, 2024
commit ddf3fb5b94320f0c4fc4791fb05c95f40450a94e
9 changes: 7 additions & 2 deletions source/funkin/ui/debug/charting/ChartEditorState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
*/
public static final WELCOME_MUSIC_FADE_IN_DURATION:Float = 10.0;

/**
* Hitsounds are played with a strange offset and this should not happen.
*/
public static final HITSOUND_OFFSET:Float = -13;

/**
* INSTANCE DATA
*/
Expand Down Expand Up @@ -6290,10 +6295,10 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
{
// Check for notes between the old and new song positions.

if (noteData.time < oldSongPosition) // Note is in the past.
if (noteData.time < (oldSongPosition - HITSOUND_OFFSET)) // Note is in the past.
continue;

if (noteData.time > newSongPosition) // Note is in the future.
if (noteData.time > (newSongPosition - HITSOUND_OFFSET)) // Note is in the future.
return; // Assume all notes are also in the future.

// Note was just hit.
Expand Down