Fixed the decapitation vision in MQ16

This commit is contained in:
Eddoursul 2024-02-02 16:51:02 +01:00
parent 5a8ac4faa8
commit 408af4d341
5 changed files with 20 additions and 28 deletions

BIN
Vision fix.esp Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -98,7 +98,7 @@ Function VisionEffectTimestopStop(bool bMovementHasBeenLocked = False)
EndFunction EndFunction
Function VisionEffectNoTimestop(Formlist RefsInvolved, Formlist ActorsToFreeze, bool bCustomMusic = False) Function VisionEffectNoTimestop(Formlist RefsInvolved, Formlist ActorsToFreeze = None, bool bCustomMusic = False)
Game.ShowFirstPersonGeometry(False) Game.ShowFirstPersonGeometry(False)
PlayerREF.SetAlpha(0.1) PlayerREF.SetAlpha(0.1)
@ -122,16 +122,16 @@ Function VisionEffectNoTimestop(Formlist RefsInvolved, Formlist ActorsToFreeze,
EndIf EndIf
if RefsInvolved != None if RefsInvolved != None
int iIndex = RefsInvolved.GetSize() Int iIndex = 0
Form[] actors = RefsInvolved.ToArray()
while iIndex > 0 While iIndex < actors.Length
iIndex -= 1 Actor VisionREF = actors[iIndex] as Actor
Actor VisionREF = RefsInvolved.GetAt(iIndex) as Actor
if VisionREF.IsDisabled() if VisionREF.IsDisabled()
VisionREF.EnableNoWait() VisionREF.EnableNoWait()
EndIf EndIf
VisionRef.SetAlpha(0.5) VisionRef.SetAlpha(0.5)
MS04MemoryFXBody01VFX.Play(VisionREF) MS04MemoryFXBody01VFX.Play(VisionREF)
iIndex += 1
EndWhile EndWhile
endif endif
@ -150,7 +150,7 @@ Function VisionEffectNoTimestop(Formlist RefsInvolved, Formlist ActorsToFreeze,
EndFunction EndFunction
Function VisionEffectNoTimestopStop(Formlist RefsInvolved, Formlist ActorsToFreeze, bool bHasBeenRestrained = False) Function VisionEffectNoTimestopStop(Formlist RefsInvolved, Formlist ActorsToFreeze = None, bool bHasBeenRestrained = False)
PlayerREF.SetAlpha(1.0) PlayerREF.SetAlpha(1.0)
Game.ShowFirstPersonGeometry(True) Game.ShowFirstPersonGeometry(True)
@ -169,14 +169,14 @@ Function VisionEffectNoTimestopStop(Formlist RefsInvolved, Formlist ActorsToFree
EndIf EndIf
if RefsInvolved != None if RefsInvolved != None
int iIndex = RefsInvolved.GetSize() Int iIndex = 0
Form[] actors = RefsInvolved.ToArray()
while iIndex > 0 While iIndex < actors.Length
iIndex -= 1 Actor VisionREF = actors[iIndex] as Actor
Actor VisionREF = RefsInvolved.GetAt(iIndex) as Actor
MS04MemoryFXBody01VFX.Stop(VisionREF) MS04MemoryFXBody01VFX.Stop(VisionREF)
VisionRef.SetAlpha(1) VisionRef.SetAlpha(1)
EndWhile iIndex += 1
EndWhile
endif endif
if ActorsToFreeze != None if ActorsToFreeze != None

View File

@ -494,31 +494,23 @@ EndFunction
Function StartVision_SC09() Function StartVision_SC09()
int iSize = MQ16_SC09_VisionNPCs.GetSize()
_00E_MQ16_VisionIMOD.Apply() _00E_MQ16_VisionIMOD.Apply()
while iSize > 0
iSize -= 1
_00E_VisionFX_NPC_SC visionNPC = MQ16_SC09_VisionNPCs.GetAt(iSize) as _00E_VisionFX_NPC_SC
visionNPC.SetAlphaAndFX()
endwhile
iVisionIntenseSound = _00E_MQ16_BattlefieldVisionM.Play(PlayerREF) iVisionIntenseSound = _00E_MQ16_BattlefieldVisionM.Play(PlayerREF)
MQ16_SC09_VisionLinkREF.Enable() MQ16_SC09_VisionLinkREF.Enable()
_00E_PlayerFunctions.GetVisionControl().VisionEffectTimestop(True, True) _00E_PlayerFunctions.GetVisionControl().VisionEffectNoTimestop(MQ16_SC09_VisionNPCs)
Wait(3)
MQ16_SC09_Vision_EnemyREF.PlayIdleWithTarget(pa_2HMKillMoveDecapSlash, MQ16_SC09_Vision_SoldierREF) MQ16_SC09_Vision_EnemyREF.PlayIdleWithTarget(pa_2HMKillMoveDecapSlash, MQ16_SC09_Vision_SoldierREF)
Wait(5)
Wait(5.5)
StopVision_SC09() StopVision_SC09()
EndFunction EndFunction
Function StopVision_SC09() Function StopVision_SC09()
_00E_PlayerFunctions.GetVisionControl().VisionEffectTimestopStop(False) _00E_PlayerFunctions.GetVisionControl().VisionEffectNoTimestopStop(MQ16_SC09_VisionNPCs)
MQ16_SC09_VisionLinkREF.Disable() MQ16_SC09_VisionLinkREF.Disable()
MQ16_SC09_VisionNPCLinkREF.Disable()
Sound.StopInstance(iVisionIntenseSound) Sound.StopInstance(iVisionIntenseSound)
ImageSpaceModifier.RemoveCrossFade() ImageSpaceModifier.RemoveCrossFade()
SetCurrentStageID(100) SetCurrentStageID(100)