diff --git a/buildnumber.txt b/buildnumber.txt index 7392849d..19e03cff 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -775 \ No newline at end of file +776 \ No newline at end of file diff --git a/source/funkin/game/Character.hx b/source/funkin/game/Character.hx index f9ce274f..30863a5b 100644 --- a/source/funkin/game/Character.hx +++ b/source/funkin/game/Character.hx @@ -332,9 +332,14 @@ class Character extends FlxSprite implements IBeatReceiver implements IOffsetCom } } + /** + * Whenever the character should dance on beat or not. Set to false for `gf`, since the dance animation is automatically handled by PlayState. + */ + public var danceOnBeat:Bool = true; + public function beatHit(curBeat:Int) { script.call("beatHit", [curBeat]); - if ((lastHit + (Conductor.stepCrochet * holdTime) < Conductor.songPosition) || animation.curAnim == null || (!animation.curAnim.name.startsWith("sing") && animation.curAnim.finished)) + if (danceOnBeat && (lastHit + (Conductor.stepCrochet * holdTime) < Conductor.songPosition) || animation.curAnim == null || (!animation.curAnim.name.startsWith("sing") && animation.curAnim.finished)) dance(); } public function stepHit(curStep:Int) { diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index bb8be432..da9fba0a 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -233,10 +233,13 @@ class PlayState extends MusicBeatState scripts.load(); scripts.call("create"); - add(gf); + if (gf != null) { + gf.danceOnBeat = false; + add(gf); + } - add(dad); - add(boyfriend); + if (dad != null) add(dad); + if (boyfriend != null) add(boyfriend); strumLine = new FlxSprite(0, 50).makeGraphic(FlxG.width, 10); @@ -951,7 +954,7 @@ class PlayState extends MusicBeatState daNote.tooLate = true; } else - canBeHit = false; + daNote.canBeHit = false; if (!daNote.mustPress && !daNote.wasGoodHit && daNote.strumTime <= Conductor.songPosition) goodNoteHit(daNote); // TODO: FIXED STEP CROCHET PER NOTES FOR BPM CHANGES