mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-23 22:05:36 +02:00
No view bobbing anymore when sliding on ice
This commit is contained in:
parent
a4b88fb463
commit
dba1e721d6
@ -30,6 +30,7 @@ Public Class OverworldCamera
|
|||||||
Public LastStepPosition As Vector3 = New Vector3(0, -2, 0)
|
Public LastStepPosition As Vector3 = New Vector3(0, -2, 0)
|
||||||
Public YawLocked As Boolean = False
|
Public YawLocked As Boolean = False
|
||||||
Public ThirdPersonOffset As Vector3 = New Vector3(0F, 0.3F, 1.5F)
|
Public ThirdPersonOffset As Vector3 = New Vector3(0F, 0.3F, 1.5F)
|
||||||
|
Public IsSliding As Boolean = False
|
||||||
|
|
||||||
'Debug variables
|
'Debug variables
|
||||||
Public oldDate As Date = Date.Now
|
Public oldDate As Date = Date.Now
|
||||||
@ -563,7 +564,7 @@ Public Class OverworldCamera
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function GetBobbing() As Single
|
Private Function GetBobbing() As Single
|
||||||
If Core.GameOptions.ViewBobbing = False Then
|
If IsSliding = True OrElse Core.GameOptions.ViewBobbing = False Then
|
||||||
Return 0.0F
|
Return 0.0F
|
||||||
End If
|
End If
|
||||||
If Screen.Level?.Riding = True Then
|
If Screen.Level?.Riding = True Then
|
||||||
@ -863,7 +864,10 @@ Public Class OverworldCamera
|
|||||||
For Each Floor As Entity In Screen.Level.Floors
|
For Each Floor As Entity In Screen.Level.Floors
|
||||||
If Floor.boundingBox.Contains(Position2D) = ContainmentType.Contains Then
|
If Floor.boundingBox.Contains(Position2D) = ContainmentType.Contains Then
|
||||||
If CType(Floor, Floor).IsIce = True Then
|
If CType(Floor, Floor).IsIce = True Then
|
||||||
|
IsSliding = True
|
||||||
Return CType(Floor, Floor).GetIceFloors()
|
Return CType(Floor, Floor).GetIceFloors()
|
||||||
|
Else
|
||||||
|
IsSliding = False
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
Loading…
x
Reference in New Issue
Block a user