diff --git a/source/funkin/play/character/BaseCharacter.hx b/source/funkin/play/character/BaseCharacter.hx index 44254f373..4364631d3 100644 --- a/source/funkin/play/character/BaseCharacter.hx +++ b/source/funkin/play/character/BaseCharacter.hx @@ -1,12 +1,12 @@ package funkin.play.character; -import funkin.play.character.CharacterData.CharacterDataParser; import flixel.math.FlxPoint; -import funkin.modding.events.ScriptEvent; -import funkin.modding.events.ScriptEvent.UpdateScriptEvent; -import funkin.play.character.CharacterData.CharacterDataParser; import funkin.Note.NoteDir; import funkin.modding.events.ScriptEvent.NoteScriptEvent; +import funkin.modding.events.ScriptEvent.UpdateScriptEvent; +import funkin.modding.events.ScriptEvent; +import funkin.play.character.CharacterData.CharacterDataParser; +import funkin.play.character.CharacterData.CharacterDataParser; import funkin.play.stage.Bopper; using StringTools; @@ -124,6 +124,8 @@ class BaseCharacter extends Bopper this.singTimeCrochet = _data.singTime; this.globalOffsets = _data.offsets; } + + shouldBop = false; } /** @@ -213,8 +215,9 @@ class BaseCharacter extends Bopper var shouldStopSinging:Bool = (this.characterType == BF) ? !isHoldingNote() : true; FlxG.watch.addQuick('singTimeMs-${characterId}', singTimeMs); - if (holdTimer > singTimeMs && shouldStopSinging) + if (holdTimer > singTimeMs && shouldStopSinging && !getCurrentAnimation().endsWith("miss")) { + trace(getCurrentAnimation()); // trace('holdTimer reached ${holdTimer}sec (> ${singTimeMs}), stopping sing animation'); holdTimer = 0; dance(true); diff --git a/source/funkin/play/stage/Bopper.hx b/source/funkin/play/stage/Bopper.hx index dfb91607c..2d5cd9d3e 100644 --- a/source/funkin/play/stage/Bopper.hx +++ b/source/funkin/play/stage/Bopper.hx @@ -36,6 +36,12 @@ class Bopper extends FlxSprite implements IPlayStateScriptedClass */ public var idleSuffix(default, set):String = ""; + /** + * Whether this bopper should bop every beat. By default it's true, but when used + * for characters/players, it should be false so it doesn't cut off their animations!!!!! + */ + public var shouldBop:Bool = true; + function set_idleSuffix(value:String):String { this.idleSuffix = value; @@ -93,7 +99,7 @@ class Bopper extends FlxSprite implements IPlayStateScriptedClass { if (danceEvery > 0 && event.beat % danceEvery == 0) { - dance(true); + dance(shouldBop); } }