mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-03-20 08:59:50 +00:00
crash fix when pressing before loop
This commit is contained in:
parent
4d3766b65b
commit
05858a4f6c
|
@ -125,7 +125,7 @@ class LatencyState extends MusicBeatSubstate
|
||||||
|
|
||||||
if (FlxG.keys.justPressed.X)
|
if (FlxG.keys.justPressed.X)
|
||||||
{
|
{
|
||||||
var closestBeat:Int = Math.round(Conductor.songPosition / Conductor.crochet);
|
var closestBeat:Int = Math.round(Conductor.songPosition / Conductor.crochet) % diffGrp.members.length;
|
||||||
var getDiff:Float = Conductor.songPosition - (closestBeat * Conductor.crochet);
|
var getDiff:Float = Conductor.songPosition - (closestBeat * Conductor.crochet);
|
||||||
getDiff -= Conductor.visualOffset;
|
getDiff -= Conductor.visualOffset;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue