From 96f1bc7edf8119297ccb6c58c986259b59361e64 Mon Sep 17 00:00:00 2001 From: Yoshman29 <81191621+YoshiCrafter29@users.noreply.github.com> Date: Sat, 18 Feb 2023 17:01:18 +0100 Subject: [PATCH] splashes can be disabled --- buildnumber.txt | 2 +- source/funkin/game/PlayState.hx | 6 ++++-- source/funkin/options/Options.hx | 1 + source/funkin/options/categories/AppearanceOptions.hx | 4 ++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/buildnumber.txt b/buildnumber.txt index 333ad531..db041382 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -2260 \ No newline at end of file +2261 \ No newline at end of file diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index c5376442..d618b50e 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -922,7 +922,9 @@ class PlayState extends MusicBeatState notes.add(swagNote); } - splashHandler.getSplashGroup(swagNote.splash); + // preload splash + if (Options.splashesEnabled) + splashHandler.getSplashGroup(swagNote.splash); } } notes.sortNotes(); @@ -1564,7 +1566,7 @@ class PlayState extends MusicBeatState var event:NoteHitEvent; if (note.strumLine != null && !note.strumLine.cpu) - event = scripts.event("onPlayerHit", EventManager.get(NoteHitEvent).recycle(false, !note.isSustainNote, !note.isSustainNote, note, note.strumLine.characters, true, note.noteType, note.animSuffix, "game/score/", "", note.strumID, score, note.isSustainNote ? null : accuracy, note.noteData > 0 ? 0.023 : 0.004, daRating, !note.isSustainNote && daRating == "sick")); + event = scripts.event("onPlayerHit", EventManager.get(NoteHitEvent).recycle(false, !note.isSustainNote, !note.isSustainNote, note, note.strumLine.characters, true, note.noteType, note.animSuffix, "game/score/", "", note.strumID, score, note.isSustainNote ? null : accuracy, note.noteData > 0 ? 0.023 : 0.004, daRating, Options.splashesEnabled && !note.isSustainNote && daRating == "sick")); else event = scripts.event("onDadHit", EventManager.get(NoteHitEvent).recycle(false, false, false, note, note.strumLine.characters, false, note.noteType, note.animSuffix, "game/score/", "", note.strumID, 0, null, 0, daRating, false)); scripts.event("onNoteHit", event); diff --git a/source/funkin/options/Options.hx b/source/funkin/options/Options.hx index 62036d8f..e154dd9b 100644 --- a/source/funkin/options/Options.hx +++ b/source/funkin/options/Options.hx @@ -27,6 +27,7 @@ class Options public static var week6PixelPerfect:Bool = true; public static var lowMemoryMode:Bool = false; public static var betaUpdates:Bool = false; + public static var splashesEnabled:Bool = true; public static var hitWindow:Float = 250; public static var framerate:Int = 120; diff --git a/source/funkin/options/categories/AppearanceOptions.hx b/source/funkin/options/categories/AppearanceOptions.hx index 5d47d243..f22b82a0 100644 --- a/source/funkin/options/categories/AppearanceOptions.hx +++ b/source/funkin/options/categories/AppearanceOptions.hx @@ -11,6 +11,10 @@ class AppearanceOptions extends OptionsScreen { "Pixel Perfect Effect", "If checked, Week 6 will have a pixel perfect effect to it enabled, aligning every pixel on the screen.", "week6PixelPerfect"), + new Checkbox( + "Enable splashes", + "If checked, the game will show a note impact effect everytime you hit a note with a Sick! rating.", + "splashesEnabled"), new Checkbox( "Flashing Menu", "If unchecked, will disable menu flashing when you select an option in the Main Menu, and other flashs will be slower",