public override void UpdateOnceBeforeFrame() { base.UpdateOnceBeforeFrame(); m_detector.Init(); NeedsUpdate |= VRage.ModAPI.MyEntityUpdateEnum.EACH_100TH_FRAME; if (Sync.IsClient) { NeedsUpdate |= VRage.ModAPI.MyEntityUpdateEnum.EACH_FRAME; (Entity as IMyOreDetector).AppendingCustomInfo += m_detector.AppendingCustomInfo; } }
public override void UpdateOnceBeforeFrame() { try { base.UpdateOnceBeforeFrame(); m_detector.Init(); NeedsUpdate |= VRage.ModAPI.MyEntityUpdateEnum.EACH_100TH_FRAME; if (Sync.IsClient) { NeedsUpdate |= VRage.ModAPI.MyEntityUpdateEnum.EACH_FRAME; (Entity as IMyOreDetector).AppendingCustomInfo += m_detector.AppendingCustomInfo; } } catch (Exception exc) { MyLog.Default.WriteLineAndConsole($"##MOD: nanites UpdateOnceBeforeFrame, ERROR: {exc}"); } }