diff --git a/scripts/_00E_BrawlControl.pex b/scripts/_00E_BrawlControl.pex index 016a8e27..fc6554e6 100644 Binary files a/scripts/_00E_BrawlControl.pex and b/scripts/_00E_BrawlControl.pex differ diff --git a/scripts/_00E_CombatMusicControl.pex b/scripts/_00E_CombatMusicControl.pex index d4fab48c..97ea8b43 100644 Binary files a/scripts/_00E_CombatMusicControl.pex and b/scripts/_00E_CombatMusicControl.pex differ diff --git a/source/scripts/_00E_BrawlControl.psc b/source/scripts/_00E_BrawlControl.psc index 3f432f12..df6c8748 100644 --- a/source/scripts/_00E_BrawlControl.psc +++ b/source/scripts/_00E_BrawlControl.psc @@ -2,6 +2,8 @@ Scriptname _00E_BrawlControl extends Quest Hidden Function Brawl(Actor pTarget, Actor pTargetFriend = None) + _00E_PlayerFunctions.GetCombatMusicControl().IsStartingBrawling() + FavorBrawlEvent.SendStoryEvent(None, pTarget, pTargetFriend) EndFunction diff --git a/source/scripts/_00E_CombatMusicControl.psc b/source/scripts/_00E_CombatMusicControl.psc index dff46ca3..e2772269 100644 --- a/source/scripts/_00E_CombatMusicControl.psc +++ b/source/scripts/_00E_CombatMusicControl.psc @@ -32,9 +32,28 @@ Function InitCombatMusic() EndIf EndFunction +function IsStartingBrawling() + bIsBrawling = true + RegisterForSingleUpdate(1.0) +endfunction + +event OnUpdate() + bIsBrawling = false +endevent + Event OnCombatStateChange(string eventName, string bTargetIsPlayer, float fCombatState, Form sender) if bTargetIsPlayer ; start combat or searching if fCombatState as int == 1 ; combat + if bIsBrawling + bIsBrawling = false + if GetState() == "" + UnregisterForUpdate() + else + StopCombatMusic() + endif + return + endif + ; start music Actor sourceActor = sender as Actor Int encounterLevel = sourceActor.GetLevel() @@ -205,6 +224,8 @@ Function RemoveCombatSoundtracks() EndFunction +bool bIsBrawling = false + Keyword Property ActorTypeBoss Auto GlobalVariable Property PlayerLevel Auto