diff options
| -rw-r--r-- | Lights.cs | 76 | ||||
| -rw-r--r-- | Plugin.cs | 4 |
2 files changed, 2 insertions, 78 deletions
@@ -583,25 +583,6 @@ namespace WorldTuningTool public void PostUpdateLightLinker() { - if (Monitor.TryEnter(sceneLights)) - { - try - { - PostUpdateLightLinkerN(); - } - finally - { - Monitor.Exit(sceneLights); - } - } - else - { - Assert(false); - } - } - - public void PostUpdateLightLinkerN() - { foreach (uLight light in sceneLights) { foreach (Parameter param in light.Parameters) @@ -613,25 +594,6 @@ namespace WorldTuningTool public void OnUpdate() { - if (Monitor.TryEnter(sceneLights)) - { - try - { - OnUpdateN(); - } - finally - { - Monitor.Exit(sceneLights); - } - } - else - { - Assert(false); - } - } - - public void OnUpdateN() - { lock (newLights) { for (int i = newLights.Count - 1; i >= 0; i--) @@ -668,25 +630,6 @@ namespace WorldTuningTool private void cleanupCommon(nint lightObject) { - if (Monitor.TryEnter(sceneLights)) - { - try - { - cleanupCommonN(lightObject); - } - finally - { - Monitor.Exit(sceneLights); - } - } - else - { - Assert(false); - } - } - - private void cleanupCommonN(nint lightObject) - { for (int i = 0; i < sceneLights.Count; i++) { uLight light = sceneLights[i]; @@ -933,25 +876,6 @@ namespace WorldTuningTool public unsafe void DrawUI(float width) { - if (Monitor.TryEnter(sceneLights)) - { - try - { - DrawUIN(width); - } - finally - { - Monitor.Exit(sceneLights); - } - } - else - { - Assert(false); - } - } - - public unsafe void DrawUIN(float width) - { int lightType = -1; nint lightObject = 0x0; if (ImGui.Button("New Point Light")) @@ -71,8 +71,8 @@ namespace WorldTuningTool { if (!condition && !loggedAssertFailed) { - Log.Error($"Assert failed on line {line}."); - //loggedAssertFailed = true; + Log.Error($"Assert failed on line {line}, further asserts won't be logged."); + loggedAssertFailed = true; } #if ENABLE_ASSERTS Trace.Assert(condition); |