From 922fa11e0acd91975d8259a18217cd41724e7dae Mon Sep 17 00:00:00 2001 From: Yoshman29 <81191621+YoshiCrafter29@users.noreply.github.com> Date: Sat, 18 Mar 2023 02:28:06 +0100 Subject: [PATCH] fixes --- assets/data/stages/spooky.hx | 4 ++-- buildnumber.txt | 2 +- source/funkin/game/PlayState.hx | 14 +++++++++++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/assets/data/stages/spooky.hx b/assets/data/stages/spooky.hx index 1589bd7c..c493f5fc 100644 --- a/assets/data/stages/spooky.hx +++ b/assets/data/stages/spooky.hx @@ -4,12 +4,12 @@ public var lightningOffset:Int = 8; public var thunderSFXamount:Int = 2; function create() { - for(i in 0...2) + for(i in 1...thunderSFXamount+1) FlxG.sound.load(Paths.sound('thunder_' + Std.string(i))); } public function lightningStrikeShit():Void { - FlxG.sound.play(Paths.soundRandom('thunder_', 1, 2)); + FlxG.sound.play(Paths.soundRandom('thunder_', 1, thunderSFXamount)); bg.animation.play('lightning'); lightningStrikeBeat = curBeat; diff --git a/buildnumber.txt b/buildnumber.txt index 8263b02e..881449a4 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -2566 \ No newline at end of file +2569 \ No newline at end of file diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index a2f21b2f..4405e5c6 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -548,6 +548,10 @@ class PlayState extends MusicBeatState #if REGION for(content in Paths.getFolderContent('images/game/score/', true, true)) FlxG.bitmap.add(content); + + for(i in 1...4) { + FlxG.sound.load(Paths.sound('missnote' + Std.string(i))); + } #end // STRUMS & NOTES INITIALISATION @@ -586,7 +590,7 @@ class PlayState extends MusicBeatState } var strOffset:Float = strumLine.strumLinePos == null ? (strumLine.type == 1 ? 0.75 : 0.25) : strumLine.strumLinePos; - var strLine = new StrumLine(chars, strOffset, !coopMode && !((strumLine.type == 1 && !opponentMode) || (strumLine.type == 0 && opponentMode)), strumLine.type != 1, coopMode ? (strumLine.type == 1 ? controlsP1 : controlsP2) : controls); + var strLine = new StrumLine(chars, strOffset, strumLine.type == 2 || (!coopMode && !((strumLine.type == 1 && !opponentMode) || (strumLine.type == 0 && opponentMode))), strumLine.type != 1, coopMode ? (strumLine.type == 1 ? controlsP1 : controlsP2) : controls); strLine.cameras = [camHUD]; strLine.data = strumLine; strumLines.push(strLine); @@ -849,6 +853,14 @@ class PlayState extends MusicBeatState if (songData == null) songData = SONG; events = songData.events != null ? [for(e in songData.events) e] : []; + // get first camera focus + for(e in events) { + if (e.time > 10) break; + if (e.type == CAM_MOVEMENT) { + executeEvent(e); + break; + } + } events.sort(function(p1, p2) { return FlxSort.byValues(FlxSort.ASCENDING, p1.time, p2.time); });