Clean up and fix double-starting music #2

Merged
nikita merged 15 commits from ratijas/muzika-gromche:work/r/double-trigger into master 2025-07-11 20:06:25 +00:00
1 changed files with 4 additions and 2 deletions
Showing only changes of commit 38d4ddd7c6 - Show all commits

View File

@ -184,8 +184,10 @@ namespace MuzikaGromche
[HarmonyPrefix] [HarmonyPrefix]
public static void DoNotStopTheMusicPrefix(JesterAI __instance, out State __state) public static void DoNotStopTheMusicPrefix(JesterAI __instance, out State __state)
{ {
__state = new State(); __state = new State
__state.prevStateindex = __instance.previousState; {
prevStateindex = __instance.previousState
};
if (__instance.currentBehaviourStateIndex == 2 && __instance.previousBehaviourStateIndex != 2) if (__instance.currentBehaviourStateIndex == 2 && __instance.previousBehaviourStateIndex != 2)
{ {
// if just popped out // if just popped out