25 lines
601 B
C#
25 lines
601 B
C#
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();
|
|
}
|
|
}
|
|
}
|