Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions example_mods/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Exclude any experimental mods that my have been added.
/*
!introMod
!testing123
# Exclude any experimental mods that my have been added.
/*
!introMod
!testing123
21 changes: 20 additions & 1 deletion source/funkin/play/character/BaseCharacter.hx
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,26 @@ class BaseCharacter extends Bopper
*/
public function playSingAnimation(dir:NoteDirection, miss:Bool = false, ?suffix:String = ''):Void
{
var anim:String = 'sing${dir.nameUpper}${miss ? 'miss' : ''}${suffix != '' ? '-${suffix}' : ''}';
var anim:String = 'sing';

anim += dir.nameUpper;

if (this.animation.name.startsWith('sing'))
{
var splitAnimName = this.animation.name.split('sing')[1].replace('miss', '').split('-')[0]; // this turns smth like 'singLEFT-censor' into 'LEFT'

var multiDirAnimExists = false;

if (hasAnimation(anim + splitAnimName) && !miss && suffix == '') multiDirAnimExists = true;
if (hasAnimation(anim + splitAnimName + 'miss') && miss && suffix == '') multiDirAnimExists = true;
if (hasAnimation(anim + splitAnimName + '-${suffix}') && !miss && suffix != '') multiDirAnimExists = true;
if (hasAnimation(anim + splitAnimName + 'miss-${suffix}') && miss && suffix == '') multiDirAnimExists = true;

if (multiDirAnimExists) anim += splitAnimName.toUpperCase();
}

if (miss) anim += 'miss';
if (suffix != '') anim += '-${suffix}';

// restart even if already playing, because the character might sing the same note twice.
// trace('Playing ${anim}...');
Expand Down