|
12345678910111213141516171819202122232425 |
- using System;
-
- using RobocraftX.StateSync;
- using Svelto.ECS;
-
- using HarmonyLib;
-
- namespace GamecraftModdingAPI.Utility
- {
- [HarmonyPatch(typeof(DeterministicStepCompositionRoot), "ResetWorld")]
- public static class DeterministicStepCompositionRootPatch
- {
- private static SimpleEntitiesSubmissionScheduler engineRootScheduler;
- public static void Postfix(SimpleEntitiesSubmissionScheduler scheduler)
- {
- engineRootScheduler = scheduler;
- }
-
- internal static void SubmitEntitiesNow()
- {
- if (engineRootScheduler != null)
- engineRootScheduler.SubmitEntities();
- }
- }
- }
|