enderalse/source/scripts/_00E_CameraControl.psc
2024-02-08 17:03:42 +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("Variable08", fCameraMaxDistance)
fMinDist = Utility.GetIniFloat("fVanityModeMinDist:Camera")
else
PlayerREF.SetActorValue("Variable08", 600.0)
endif
Utility.SetINIFloat("fVanityModeMaxDist:Camera", fMinDist)
EndFunction
Function UnlockVanityCamera() Global
Actor PlayerREF = Game.GetForm(0x14) as Actor
float fCameraMaxDistance = PlayerREF.GetActorValue("Variable08")
if fCameraMaxDistance <= 0
fCameraMaxDistance = 600.0
endif
Utility.SetINIFloat("fVanityModeMaxDist:Camera", fCameraMaxDistance)
PlayerREF.SetActorValue("Variable08", 0)
EndFunction