enderalse/source/scripts/_00E_CameraControl.psc
2024-02-18 22:21:38 +01:00

33 lines
850 B
Plaintext

Scriptname _00E_CameraControl Hidden
Function LockVanityCamera() Global
Actor PlayerREF = Game.GetForm(0x14) as Actor
float fMinDist = 150.0
if SKSE.GetVersion()
float fCameraMaxDistance = Utility.GetIniFloat("fVanityModeMaxDist:Camera")
PlayerREF.SetActorValue("Variable04", fCameraMaxDistance)
fMinDist = Utility.GetIniFloat("fVanityModeMinDist:Camera")
else
PlayerREF.SetActorValue("Variable04", 600.0)
endif
Utility.SetINIFloat("fVanityModeMaxDist:Camera", fMinDist)
EndFunction
Function UnlockVanityCamera() Global
Actor PlayerREF = Game.GetForm(0x14) as Actor
float fCameraMaxDistance = PlayerREF.GetActorValue("Variable04")
if fCameraMaxDistance <= 0
fCameraMaxDistance = 600.0
endif
Utility.SetINIFloat("fVanityModeMaxDist:Camera", fCameraMaxDistance)
PlayerREF.SetActorValue("Variable04", 0)
EndFunction