From 46cb18974d122d1107c912c0b33f9bef6a38d9e7 Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Sun, 21 Jul 2024 14:48:55 +0200 Subject: [PATCH] Fix warp sound for 2 arguments in command --- .../V2/ScriptCommands/DoPlayer.vb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb index ecbc4e254..36a22d74b 100644 --- a/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb +++ b/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb @@ -279,6 +279,28 @@ Screen.Camera.Position = New Vector3(sng(argument.GetSplit(0).Replace("~", CStr(cPosition.X)).Replace(".", GameController.DecSeparator)), sng(argument.GetSplit(1).Replace("~", CStr(cPosition.Y)).Replace(".", GameController.DecSeparator)), sng(argument.GetSplit(2).Replace("~", CStr(cPosition.Z)).Replace(".", GameController.DecSeparator))) + Case 1 + If argument.GetSplit(0).Contains(".dat") = True Then + Screen.Level.WarpData.WarpDestination = argument.GetSplit(0) + Screen.Level.WarpData.WarpPosition = Screen.Camera.Position + Screen.Level.WarpData.WarpRotations = 0 + Dim WarpSoundData As Integer = CInt(argument.GetSplit(1)) + Select Case WarpSoundData + Case 0 + Screen.Level.WarpData.WarpSound = "Warp_Exit" + Case 1 + Screen.Level.WarpData.WarpSound = "Warp_Door" + Case 2 + Screen.Level.WarpData.WarpSound = "Warp_Ladder" + Case 3 + Screen.Level.WarpData.WarpSound = "" + Case Else + Screen.Level.WarpData.WarpSound = "Warp_Exit" + End Select + Screen.Level.WarpData.DoWarpInNextTick = True + Screen.Level.WarpData.CorrectCameraYaw = Screen.Camera.Yaw + End If + Case 0 Screen.Level.WarpData.WarpDestination = argument Screen.Level.WarpData.WarpPosition = Screen.Camera.Position