Sort all layers before splitting them into upper and lower in preparation for sorted rendering.

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
2024-02-26 21:22:18 +00:00
parent 5035dd5af9
commit 3e180c26d2
3 changed files with 24 additions and 5 deletions
+3
View File
@@ -132,6 +132,9 @@ void Audio::PlayBGM(const std::string_view sound,const bool loop){
void Audio::StopBGM(){
if(Self().BGMIsPlaying()){
BGM&currentTrack=Self().bgm[Self().currentBGM];
for(int trackID:currentTrack.GetChannelIDs()){
Engine().SetVolume(trackID,0.f);
}
for(int trackID:currentTrack.GetChannelIDs()){
Engine().Stop(trackID);
}