2020-08-14 05:04:31 +02:00
|
|
|
|
using OWML.ModHelper.Events;
|
2020-08-13 22:06:34 +01:00
|
|
|
|
|
|
|
|
|
namespace QSB.TimeSync
|
|
|
|
|
{
|
|
|
|
|
public static class WakeUpPatches
|
|
|
|
|
{
|
|
|
|
|
public static void AddPatches()
|
|
|
|
|
{
|
2020-08-14 05:04:31 +02:00
|
|
|
|
QSB.Helper.HarmonyHelper.AddPrefix<PlayerCameraEffectController>("OnStartOfTimeLoop", typeof(WakeUpPatches), nameof(OnStartOfTimeLoopPrefix));
|
2020-08-13 22:06:34 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static bool OnStartOfTimeLoopPrefix(ref PlayerCameraEffectController __instance)
|
|
|
|
|
{
|
2020-08-16 22:39:21 +02:00
|
|
|
|
if (__instance.gameObject.CompareTag("MainCamera") && QSBSceneManager.CurrentScene != OWScene.EyeOfTheUniverse)
|
2020-08-13 22:06:34 +01:00
|
|
|
|
{
|
2020-08-14 05:04:31 +02:00
|
|
|
|
__instance.Invoke("WakeUp");
|
2020-08-13 22:06:34 +01:00
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|