fix animation shit

This commit is contained in:
KadeDeveloper 2021-08-07 19:14:10 -07:00
parent a9365239f0
commit b2bed6bcf0

View File

@ -3030,6 +3030,10 @@ class PlayState extends MusicBeatState
}
// Accessing the animation name directly to play it
if (!daNote.isParent && daNote.parent != null)
{
if (daNote.spotInLine != daNote.parent.children.length - 1)
{
var singData:Int = Std.int(Math.abs(daNote.noteData));
dad.playAnim('sing' + dataSuffix[singData] + altAnim, true);
@ -3061,7 +3065,42 @@ class PlayState extends MusicBeatState
if (SONG.needsVoices)
vocals.volume = 1;
}
}
else
{
var singData:Int = Std.int(Math.abs(daNote.noteData));
dad.playAnim('sing' + dataSuffix[singData] + altAnim, true);
if (FlxG.save.data.cpuStrums)
{
cpuStrums.forEach(function(spr:FlxSprite)
{
if (Math.abs(daNote.noteData) == spr.ID)
{
spr.animation.play('confirm', true);
}
if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school'))
{
spr.centerOffsets();
spr.offset.x -= 13;
spr.offset.y -= 13;
}
else
spr.centerOffsets();
});
}
#if windows
if (luaModchart != null)
luaModchart.executeState('playerTwoSing', [Math.abs(daNote.noteData), Conductor.songPosition]);
#end
dad.holdTimer = 0;
if (SONG.needsVoices)
vocals.volume = 1;
}
daNote.active = false;
daNote.kill();