From 9d5411986f3a45466a8f631f1d1af6caddb6d079 Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Thu, 15 Dec 2022 19:13:10 +0100 Subject: [PATCH] Update TurningSign entity rotation speed system --- P3D/Entites/Enviroment/TurningSign.vb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/P3D/Entites/Enviroment/TurningSign.vb b/P3D/Entites/Enviroment/TurningSign.vb index 82d79a279..e81c86e20 100644 --- a/P3D/Entites/Enviroment/TurningSign.vb +++ b/P3D/Entites/Enviroment/TurningSign.vb @@ -2,7 +2,7 @@ Inherits Entity - Dim TurningSpeed As Single = 0.01F + Dim TurningSpeed As Single = 1 / 100 * MathHelper.Pi Public Overrides Sub Initialize() MyBase.Initialize() @@ -18,12 +18,17 @@ End Select If StringHelper.IsNumeric(Me.AdditionalValue) = True Then - Me.TurningSpeed = CSng(CInt(Me.AdditionalValue) / 100) + Me.TurningSpeed = CSng(CInt(Me.AdditionalValue) / 100 * MathHelper.Pi) End If Me.CreateWorldEveryFrame = True End Sub Public Overrides Sub UpdateEntity() + If Me.TurningSpeed <> CSng(CInt(Me.AdditionalValue) / 100 * MathHelper.Pi) Then + If StringHelper.IsNumeric(Me.AdditionalValue) = True Then + Me.TurningSpeed = CSng(CInt(Me.AdditionalValue) / 100 * MathHelper.Pi) + End If + End If Select Case Me.ActionValue Case 1 Me.Rotation.X += TurningSpeed