Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scn B42InertiaS
- int iDone
- int iReset
- float X
- float Z
- float deltaX
- float deltaZ
- float deltaXapply
- float deltaZapply
- float fAppliedVertical
- float fAppliedHorizontal
- Begin GameMode
- if IsPC1stPerson == 1 && Player.IsWeaponOut == 1 && player.GetAnimAction != 0
- set iReset to 0
- if iDone == 0
- SetNumericGameSetting fFirstPersonHandFollowMult 1
- SetNumericGameSetting fFirstPersonHandChaseSeconds 0
- set iDone to 1
- endif
- set deltaX to player.GetAngle X - X
- set X to player.GetAngle X
- set deltaZ to player.GetAngle Z - Z
- set Z to player.GetAngle Z
- if deltaX < 3.5 && deltaX > -3.5
- set deltaXapply to (deltaX * (2 - (GetPCUsingIronSights * 2))) / -1
- endif
- if deltaZ < 6 && deltaZ > -6
- set deltaZapply to (deltaZ * (2 - (GetPCUsingIronSights * 2)))
- endif
- if deltaXapply > 3.5
- set deltaXapply to 3.5
- elseif deltaXapply < -3.5
- set deltaXapply to -3.5
- endif
- if deltaZapply > 6
- set deltaZapply to 6
- elseif deltaZapply < -6
- set deltaZapply to -6
- endif
- set fAppliedVertical to fAppliedVertical + (((deltaXapply - fAppliedVertical) * 4) * GetSecondsPassed)
- set fAppliedHorizontal to fAppliedHorizontal + (((deltaZapply - fAppliedHorizontal) * 4) * GetSecondsPassed)
- if GetPCUsingIronSights
- Player.SetNifBlockRotation "Spine0Controller" fAppliedHorizontal 0 fAppliedVertical
- Player.SetNifBlockRotation "NeckController" 0 0 0
- else
- Player.SetNifBlockRotation "NeckController" fAppliedHorizontal 0 fAppliedVertical
- Player.SetNifBlockRotation "Spine0Controller" 0 0 0
- endif
- else
- if iReset == 0
- Player.SetNifBlockRotation "Spine0Controller" 0 0 0
- Player.SetNifBlockRotation "NeckController" 0 0 0
- set iReset to 1
- set iDone to 0
- endif
- endif
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement