diff --git a/source/funkin/backend/FunkinSprite.hx b/source/funkin/backend/FunkinSprite.hx index d8e2af50..60e131e3 100644 --- a/source/funkin/backend/FunkinSprite.hx +++ b/source/funkin/backend/FunkinSprite.hx @@ -142,7 +142,7 @@ class FunkinSprite extends FlxSkewedSprite implements IBeatReceiver implements I public function beatHit(curBeat:Int) { if (Conductor.curBeat != curBeat || (skipNegativeBeats && curBeat < 0)) return; - if (beatAnims.length > 0 && (curBeat + beatOffset - Conductor.lastBeatChange) % (beatInterval * CoolUtil.minInt(Math.floor(4 / Conductor.stepsPerBeat), 1)) == 0) + if (beatAnims.length > 0 && (curBeat + beatOffset - Conductor.lastBeatChange) % (beatInterval * CoolUtil.maxInt(Math.floor(4 / Conductor.stepsPerBeat), 1)) == 0) { // TODO: find a solution without countedBeat var anim = beatAnims[FlxMath.wrap(countedBeat++, 0, beatAnims.length - 1)]; diff --git a/source/funkin/game/Character.hx b/source/funkin/game/Character.hx index 5d9643ce..ff1341b9 100644 --- a/source/funkin/game/Character.hx +++ b/source/funkin/game/Character.hx @@ -174,7 +174,7 @@ class Character extends FunkinSprite implements IBeatReceiver implements IOffset scripts.call("beatHit", [curBeat]); if (Conductor.curBeat != curBeat || (skipNegativeBeats && curBeat < 0)) return; - if (danceOnBeat && (curBeat + beatOffset - Conductor.lastBeatChange) % (beatInterval * CoolUtil.minInt(Math.floor(4 / Conductor.stepsPerBeat), 1)) == 0 && !__lockAnimThisFrame) + if (danceOnBeat && (curBeat + beatOffset - Conductor.lastBeatChange) % (beatInterval * CoolUtil.maxInt(Math.floor(4 / Conductor.stepsPerBeat), 1)) == 0 && !__lockAnimThisFrame) tryDance(); }