1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-11-22 05:03:42 +00:00

A few bug fixes related to vocal tracks

This commit is contained in:
EliteMasterEric 2023-05-25 19:36:32 -04:00
parent 2af4a51b15
commit dc932eb8d7
4 changed files with 11 additions and 5 deletions

View file

@ -89,7 +89,7 @@
{ {
"name": "json2object", "name": "json2object",
"type": "haxelib", "type": "haxelib",
"version": null "version": "3.11.0"
}, },
{ {
"name": "lime", "name": "lime",
@ -118,4 +118,4 @@
"version": "0.2.2" "version": "0.2.2"
} }
] ]
} }

View file

@ -79,6 +79,10 @@ class SoundGroup extends FlxTypedGroup<FlxSound>
result.pause(); result.pause();
result.time = this.time; result.time = this.time;
result.onComplete = function() {
this.onComplete();
}
// Apply parameters to the new sound. // Apply parameters to the new sound.
result.pitch = this.pitch; result.pitch = this.pitch;
result.volume = this.volume; result.volume = this.volume;
@ -86,6 +90,8 @@ class SoundGroup extends FlxTypedGroup<FlxSound>
return result; return result;
} }
public dynamic function onComplete():Void {}
/** /**
* Pause all the sounds in the group. * Pause all the sounds in the group.
*/ */

View file

@ -1093,7 +1093,7 @@ class PlayState extends MusicBeatState
// TODO: Fix grouped vocals // TODO: Fix grouped vocals
vocals = currentChart.buildVocals(); vocals = currentChart.buildVocals();
vocals.members[0].onComplete = function() { vocals.onComplete = function() {
vocalsFinished = true; vocalsFinished = true;
} }

View file

@ -305,7 +305,7 @@ class SongDifficulty
public inline function playInst(volume:Float = 1.0, looped:Bool = false):Void public inline function playInst(volume:Float = 1.0, looped:Bool = false):Void
{ {
var suffix:String = variation == null ? null : '-$variation'; var suffix:String = (variation ?? '') != '' ? '-$variation' : '';
FlxG.sound.playMusic(Paths.inst(this.song.songId, suffix), volume, looped); FlxG.sound.playMusic(Paths.inst(this.song.songId, suffix), volume, looped);
} }
@ -336,7 +336,7 @@ class SongDifficulty
return []; return [];
} }
var suffix:String = variation != null ? '-$variation' : ''; var suffix:String = (variation ?? '') != '' ? '-$variation' : '';
// Automatically resolve voices by removing suffixes. // Automatically resolve voices by removing suffixes.
// For example, if `Voices-bf-car.ogg` does not exist, check for `Voices-bf.ogg`. // For example, if `Voices-bf-car.ogg` does not exist, check for `Voices-bf.ogg`.