public override void UpdateBeforeSimulation() { try { if (!MonitorTask.IsComplete) { MonitorTask.Wait(); } if (MonitorTask.IsComplete && MonitorTask.valid && MonitorTask.Exceptions != null) { TaskHasErrors(ref MonitorTask, "PTask"); } Timings(); LogicUpdates(); SplitMonitor(); if (!ThreadEvents.IsEmpty) { IThreadEvent tEvent; while (ThreadEvents.TryDequeue(out tEvent)) { tEvent.Execute(); } } } catch (Exception ex) { Log.Line($"Exception in SessionBeforeSim: {ex}"); } }
public override void UpdateBeforeSimulation() { try { if (!MonitorTask.IsComplete) { MonitorTask.Wait(); } if (MonitorTask.IsComplete && MonitorTask.valid && MonitorTask.Exceptions != null) { TaskHasErrors(ref MonitorTask, "PTask"); } Timings(); if (!ThreadEvents.IsEmpty) { IThreadEvent tEvent; while (ThreadEvents.TryDequeue(out tEvent)) { tEvent.Execute(); } } LogicUpdates(); if (EmpStore.Count != 0 && !EmpDispatched) { EmpDispatched = true; PrepEmpBlast(); if (EmpWork.EventRunning) { MyAPIGateway.Parallel.Start(ComputeEmpBlast, EmpCallBack); } else { EmpDispatched = false; } } if (_warEffect && Tick20) { WarEffect(); } } catch (Exception ex) { Log.Line($"Exception in SessionBeforeSim: {ex}"); } }