Try to fix the characters dancing fast? 2

god damn it i got confused max with min sometime
This commit is contained in:
Ralty
2025-07-05 18:29:39 +07:00
parent 1a66b7109c
commit e2ff493bdf
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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)];
+1 -1
View File
@@ -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();
}