Skip to content
This repository has been archived by the owner on Apr 2, 2023. It is now read-only.

Commit

Permalink
4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SpunBlue committed Aug 8, 2022
1 parent 2875f2d commit ca96ca2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 16 deletions.
35 changes: 22 additions & 13 deletions source/Character.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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');
}
}
}

Expand Down
14 changes: 11 additions & 3 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down Expand Up @@ -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){
Expand Down

0 comments on commit ca96ca2

Please sign in to comment.