Fix import error due to invalid file name.

This commit is contained in:
2022-11-07 12:13:07 +08:00
parent 65d86ed72d
commit 7e025f9268
2 changed files with 7 additions and 4 deletions

View File

@@ -94,10 +94,11 @@ namespace Cryville.Crtr.Extensions.Malody {
var tev = (MalodyChart.Note)ev;
if (tev.type == 1) {
if (tev.beat[0] == 0 && tev.beat[1] == 0) {
result.Add(new SongResource(meta.song.name, new FileInfo(file.DirectoryName + "/" + tev.sound)));
var res = new SongResource(meta.song.name, new FileInfo(file.DirectoryName + "/" + tev.sound));
result.Add(res);
chart.sounds.Add(new Chart.Sound {
time = new BeatTime(0, 0, 1),
id = meta.song.name,
id = res.Name,
offset = -tev.offset / 1000f,
});
}