From fef6ff28df3e7871a5b9aff7fc42230c14242608 Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Fri, 5 Jul 2024 11:16:49 +0200 Subject: [PATCH] Fix WarpBlock --- P3D/Entites/Enviroment/WarpBlock.vb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/P3D/Entites/Enviroment/WarpBlock.vb b/P3D/Entites/Enviroment/WarpBlock.vb index c63b41b4e..69717d247 100644 --- a/P3D/Entites/Enviroment/WarpBlock.vb +++ b/P3D/Entites/Enviroment/WarpBlock.vb @@ -27,14 +27,16 @@ End If Next If c >= 5 Then - Dim validRotations As New List(Of Integer) + If link.GetSplit(5, ",") <> "" Then + Dim validRotations As New List(Of Integer) - Dim rotationData() As String = link.GetSplit(5, ",").Split(CChar("|")) - For Each Element As String In rotationData - validRotations.Add(CInt(Element)) - Next - If validRotations.Contains(Screen.Camera.GetPlayerFacingDirection()) = False Then - Return True + Dim rotationData() As String = link.GetSplit(5, ",").Split(CChar("|")) + For Each Element As String In rotationData + validRotations.Add(CInt(Element)) + Next + If validRotations.Contains(Screen.Camera.GetPlayerFacingDirection()) = False Then + Return True + End If End If End If Dim WarpSoundName As String = "Warp_Exit" @@ -44,7 +46,7 @@ Case 0 WarpSoundName = "Warp_Exit" Case 1 - WarpSoundName = "Warp_RegularDoor" + WarpSoundName = "Warp_Door" Case 2 WarpSoundName = "Warp_Ladder" Case 3