diff --git a/Assets/Cryville/Crtr/ChartPlayer.cs b/Assets/Cryville/Crtr/ChartPlayer.cs index 01d3ec7..aca86c9 100644 --- a/Assets/Cryville/Crtr/ChartPlayer.cs +++ b/Assets/Cryville/Crtr/ChartPlayer.cs @@ -328,23 +328,6 @@ namespace Cryville.Crtr { FileInfo skinFile = new FileInfo( Game.GameDataPath + "/skins/" + Settings.Default.LoadSkin ); - - Logger.Log("main", 0, "Load/MainThread", "Loading textures..."); - texloadtimer = new diag::Stopwatch(); - texloadtimer.Start(); - texs = new Dictionary(); - var flist = skinFile.Directory.GetFiles("*.png"); - foreach (FileInfo f in flist) { -#if NO_THREAD - using (WWW w = new WWW("file:///" + f.FullName)) { - string name = StringUtils.TrimExt(f.Name); - while (!w.isDone); - texs.Add(name, w.texture); - } -#else - texLoadQueue.Enqueue(f.FullName); -#endif - } #if NO_THREAD texloadtimer.Stop(); Logger.LogFormat("main", 0, "Load/MainThread", "Textures loaded successfully ({0}ms)", texloadtimer.Elapsed.TotalMilliseconds); @@ -362,6 +345,23 @@ namespace Cryville.Crtr { skinFile = skinFile, }); #endif + + Logger.Log("main", 0, "Load/MainThread", "Loading textures..."); + texloadtimer = new diag::Stopwatch(); + texloadtimer.Start(); + texs = new Dictionary(); + var flist = skinFile.Directory.GetFiles("*.png"); + foreach (FileInfo f in flist) { +#if NO_THREAD + using (WWW w = new WWW("file:///" + f.FullName)) { + string name = StringUtils.TrimExt(f.Name); + while (!w.isDone); + texs.Add(name, w.texture); + } +#else + texLoadQueue.Enqueue(f.FullName); +#endif + } } void Prehandle() { diff --git a/Assets/Cryville/Crtr/Event/ContainerState.cs b/Assets/Cryville/Crtr/Event/ContainerState.cs index f077bc4..a962843 100644 --- a/Assets/Cryville/Crtr/Event/ContainerState.cs +++ b/Assets/Cryville/Crtr/Event/ContainerState.cs @@ -314,7 +314,6 @@ namespace Cryville.Crtr.Event { public void Handle(StampedEvent ev, Action callback = null) { if (breakflag) return; if (ev != null) { - bool flag = false; if (ev.Unstamped is Chart.Motion) { var tev = (Chart.Motion)ev.Unstamped; var mv = RMVPool.Rent(tev.Name); @@ -354,18 +353,9 @@ namespace Cryville.Crtr.Event { } } } - if (ev.Unstamped == null) { - Callback(ev, callback); - flag = true; - } - else if (ev.Unstamped.Priority >= 0) { - Callback(ev, callback); - flag = true; - } - if (!flag) Callback(null, callback); - return; + Callback(ev.Unstamped == null || ev.Unstamped.Priority >= 0 ? ev : null, callback); } - Callback(null, callback); + else Callback(null, callback); } void Callback(StampedEvent ev, Action callback) {