From dba1e721d655244fda9bcdf76eb75ccfebf01f60 Mon Sep 17 00:00:00 2001 From: "Jasper \"JappaWakka\" Speelman" Date: Fri, 16 Sep 2022 17:56:30 +0200 Subject: [PATCH] No view bobbing anymore when sliding on ice --- P3D/Overworld/OverworldCamera.vb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/P3D/Overworld/OverworldCamera.vb b/P3D/Overworld/OverworldCamera.vb index af1c2a7e1..d162747c5 100644 --- a/P3D/Overworld/OverworldCamera.vb +++ b/P3D/Overworld/OverworldCamera.vb @@ -30,6 +30,7 @@ Public Class OverworldCamera Public LastStepPosition As Vector3 = New Vector3(0, -2, 0) Public YawLocked As Boolean = False Public ThirdPersonOffset As Vector3 = New Vector3(0F, 0.3F, 1.5F) + Public IsSliding As Boolean = False 'Debug variables Public oldDate As Date = Date.Now @@ -563,7 +564,7 @@ Public Class OverworldCamera End Sub Private Function GetBobbing() As Single - If Core.GameOptions.ViewBobbing = False Then + If IsSliding = True OrElse Core.GameOptions.ViewBobbing = False Then Return 0.0F End If If Screen.Level?.Riding = True Then @@ -863,7 +864,10 @@ Public Class OverworldCamera For Each Floor As Entity In Screen.Level.Floors If Floor.boundingBox.Contains(Position2D) = ContainmentType.Contains Then If CType(Floor, Floor).IsIce = True Then + IsSliding = True Return CType(Floor, Floor).GetIceFloors() + Else + IsSliding = False End If End If Next