This should prevent TurningSign crash

This commit is contained in:
JappaWakka 2022-12-19 06:11:48 +01:00
parent cef17ea173
commit 9d9045218c
1 changed files with 9 additions and 5 deletions

View File

@ -17,16 +17,20 @@
Me.Rotation.Y = randomValue
End Select
If StringHelper.IsNumeric(Me.AdditionalValue) = True Then
Me.TurningSpeed = CSng(CInt(Me.AdditionalValue) / 100 * MathHelper.Pi)
If Me.AdditionalValue <> "" Then
If StringHelper.IsNumeric(Me.AdditionalValue) = True Then
Me.TurningSpeed = CSng(CInt(Me.AdditionalValue) / 100 * MathHelper.Pi)
End If
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)
If Me.AdditionalValue <> "" Then
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
End If
Select Case Me.ActionValue