diff --git a/source/Character.hx b/source/Character.hx index e227114045..5e82671d3a 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -22,6 +22,8 @@ class Character extends FlxSprite public var isTxt:Bool = false; public var isMod:Bool = false; + public var useAltIdle:Bool = false; + var characterArray = []; var isLoaded:Bool = false; @@ -561,24 +563,31 @@ class Character extends FlxSprite */ public function dance() { + FlxG.log.warn('Dancing, useAltIdle is currently: $useAltIdle'); + if (!debugMode) { // why the fuck did ninjamuffin not code it like this?? if (animation.exists('danceLeft') && animation.exists('danceRight')) - { - if (!animation.curAnim.name.startsWith('hair')) - { - danced = !danced; - - if (danced) - playAnim('danceRight'); - else - playAnim('danceLeft'); + { + if (!animation.curAnim.name.startsWith('hair')) + { + danced = !danced; + + if (danced) + playAnim('danceRight'); + else + playAnim('danceLeft'); + } } - } - else{ - playAnim('idle'); - } + else{ + if (useAltIdle && animation.exists('idle-alt')){ + playAnim('idle-alt'); + //FlxG.log.add('using alternative idle'); + } + else + playAnim('idle'); + } } } diff --git a/source/PlayState.hx b/source/PlayState.hx index 4ef2c8a1d7..c53b03dfcb 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2007,9 +2007,10 @@ class PlayState extends MusicBeatState if (SONG.notes[Math.floor(curStep / 16)] != null) { - if (SONG.notes[Math.floor(curStep / 16)].altAnim) - altAnim = '-alt'; - + if (SONG.notes[Math.floor(curStep / 16)].altAnim){ + if (dad.animation.exists('singLEFT-alt')) + altAnim = '-alt'; + } if (!SONG.notes[Math.floor(curStep / 16)].gfSection){ switch (Math.abs(daNote.noteData)) { @@ -2869,6 +2870,13 @@ class PlayState extends MusicBeatState } } } + + if (SONG.notes[Math.floor(curStep / 16)] != null){ + if (SONG.notes[Math.floor(curStep / 16)].altAnim) + dad.useAltIdle = true; + else + dad.useAltIdle = false; + } } function updateGirlfriend(type:String){