make it update wake fraction even not in dream world

This commit is contained in:
JohnCorby 2022-11-17 19:48:39 -08:00
parent 43acb32288
commit 8ec1547453

View File

@ -49,6 +49,25 @@ public class AlarmSequenceControllerPatches : QSBPatch
return false;
}
[HarmonyPrefix]
[HarmonyPatch(nameof(AlarmSequenceController.Update))]
private static bool Update(AlarmSequenceController __instance)
{
__instance.UpdateWakeFraction();
if (__instance._playing)
{
__instance.UpdateChimes();
}
__instance.UpdatePulse();
if (!__instance._playing && __instance._alarmCounter == 0 && __instance._pulse <= 0.01f)
{
__instance._pulse = 0f;
__instance._targetPulse = 0f;
__instance.enabled = false;
}
return false;
}
[HarmonyPrefix]
[HarmonyPatch(nameof(AlarmSequenceController.PlaySingleChime))]
private static bool PlaySingleChime(AlarmSequenceController __instance)