Code cleanup.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
#define BUILD
|
||||
|
||||
using Cryville.Common;
|
||||
using Cryville.Common.Buffers;
|
||||
using Cryville.Crtr.Config;
|
||||
@@ -82,7 +80,6 @@ namespace Cryville.Crtr {
|
||||
|
||||
status = GameObject.Find("Status").GetComponent<TextMeshProUGUI>();
|
||||
|
||||
#if BUILD
|
||||
try {
|
||||
Play();
|
||||
}
|
||||
@@ -91,7 +88,6 @@ namespace Cryville.Crtr {
|
||||
Popup.CreateException(ex);
|
||||
ReturnToMenu();
|
||||
}
|
||||
#endif
|
||||
|
||||
// Camera.main.RenderToCubemap();
|
||||
}
|
||||
@@ -186,9 +182,7 @@ namespace Cryville.Crtr {
|
||||
Logger.Log("main", 4, "Load/MainThread", "Load failed");
|
||||
loadThread = null;
|
||||
Popup.CreateException(threadException);
|
||||
#if BUILD
|
||||
ReturnToMenu();
|
||||
#endif
|
||||
}
|
||||
else if (texloaddone) {
|
||||
if (texLoader == null) Stop();
|
||||
@@ -377,7 +371,7 @@ namespace Cryville.Crtr {
|
||||
areaJudgePrecision = 1 << Settings.Default.AreaJudgePrecision;
|
||||
forceSyncFrames = Settings.Default.ForceSyncFrames;
|
||||
texloaddone = false;
|
||||
Game.NetworkTaskWorker.SuspendBackgroundTasks();
|
||||
Game.SuspendBackgroundTasks();
|
||||
Game.AudioSession = Game.AudioSequencer.NewSession();
|
||||
|
||||
var hitPlane = new Plane(Vector3.forward, Vector3.zero);
|
||||
@@ -455,7 +449,7 @@ namespace Cryville.Crtr {
|
||||
for (int i = 0; i < queue.Count; i++) {
|
||||
#if UNITY_5_4_OR_NEWER
|
||||
texHandler = new DownloadHandlerTexture();
|
||||
texLoader = new UnityWebRequest(Game.FileProtocolPrefix + queue[i], "GET", texHandler, null);
|
||||
texLoader = new UnityWebRequest(PlatformConfig.FileProtocolPrefix + queue[i], "GET", texHandler, null);
|
||||
texLoader.SendWebRequest();
|
||||
#else
|
||||
texLoader = new WWW(Game.FileProtocolPrefix + queue[i]);
|
||||
@@ -568,10 +562,8 @@ namespace Cryville.Crtr {
|
||||
started = false;
|
||||
}
|
||||
}
|
||||
Game.NetworkTaskWorker.ResumeBackgroundTasks();
|
||||
#if BUILD
|
||||
Game.ResumeBackgroundTasks();
|
||||
ReturnToMenu();
|
||||
#endif
|
||||
}
|
||||
|
||||
void OnSettingsUpdate() {
|
||||
@@ -588,11 +580,9 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
|
||||
Exception threadException;
|
||||
#if !NO_THREAD
|
||||
Thread loadThread = null;
|
||||
volatile float loadPregress;
|
||||
Stopwatch workerTimer;
|
||||
#endif
|
||||
void Load(object _info) {
|
||||
var info = (LoadInfo)_info;
|
||||
try {
|
||||
|
Reference in New Issue
Block a user