From 71455b92a42c1ac3fbcb816bf498220c26946d67 Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Wed, 13 Oct 2021 21:23:07 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20for=20Pok=C3=A9Ball=20in=20BattleCatchScr?= =?UTF-8?q?een=20not=20reaching=20its=20destination=20and=20giving=20the?= =?UTF-8?q?=20catch=20sound=20the=20right=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- P3D/Battle/BattleAnimations/BABillMove.vb | 3 +-- P3D/Battle/BattleAnimations/BAMove.vb | 3 +-- P3D/P3D.vbproj | 2 +- P3D/Screens/Battle/BattleCatchScreen.vb | 16 ++++++++-------- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/P3D/Battle/BattleAnimations/BABillMove.vb b/P3D/Battle/BattleAnimations/BABillMove.vb index f62c80dc1..120d3b87f 100644 --- a/P3D/Battle/BattleAnimations/BABillMove.vb +++ b/P3D/Battle/BattleAnimations/BABillMove.vb @@ -17,7 +17,6 @@ EaseIn EaseOut EaseInAndOut - NoEase Linear End Enum @@ -43,7 +42,7 @@ InterpolationSpeed = MoveSpeed Case Curves.EaseInAndOut InterpolationSpeed = 0.0F - Case Curves.NoEase + Case Curves.Linear InterpolationSpeed = MoveSpeed End Select diff --git a/P3D/Battle/BattleAnimations/BAMove.vb b/P3D/Battle/BattleAnimations/BAMove.vb index 4eda74550..c1220411d 100644 --- a/P3D/Battle/BattleAnimations/BAMove.vb +++ b/P3D/Battle/BattleAnimations/BAMove.vb @@ -18,7 +18,6 @@ EaseIn EaseOut EaseInAndOut - NoEase Linear End Enum Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal Destination As Vector3, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal SpinXSpeed As Single = 0.1F, Optional ByVal SpinZSpeed As Single = 0.1F, Optional MovementCurve As Integer = 2) @@ -43,7 +42,7 @@ InterpolationSpeed = MoveSpeed Case Curves.EaseInAndOut InterpolationSpeed = 0.0F - Case Curves.NoEase + Case Curves.Linear InterpolationSpeed = MoveSpeed End Select diff --git a/P3D/P3D.vbproj b/P3D/P3D.vbproj index 129c9305f..83a17f63c 100644 --- a/P3D/P3D.vbproj +++ b/P3D/P3D.vbproj @@ -15352,7 +15352,7 @@ PreserveNewest - + PreserveNewest diff --git a/P3D/Screens/Battle/BattleCatchScreen.vb b/P3D/Screens/Battle/BattleCatchScreen.vb index 9408429a0..3720b2ede 100644 --- a/P3D/Screens/Battle/BattleCatchScreen.vb +++ b/P3D/Screens/Battle/BattleCatchScreen.vb @@ -156,6 +156,7 @@ AnimationIndex = 7 AnimationStarted = False SetupAnimation() + SoundManager.PlaySound("Battle\Pokeball\catch", False) Case 7 AnimationIndex = 8 AnimationStarted = False @@ -229,10 +230,9 @@ p.SetCatchInfos(Me.Ball, "caught at") - MusicManager.Stop() - SoundManager.PlaySound("Battle\Pokeball\catch", False) + MusicManager.Pause() + MusicManager.Play("wild_defeat", False, 0.0F) SoundManager.PlaySound("success_catch", True) - MusicManager.Play("wild_defeat", False, 0.2F) TextBox.Show(s, {}, False, False) End Sub @@ -272,16 +272,16 @@ Select Case Me.AnimationIndex Case 0 - Animations.Add(New BAMove(New Vector3(Camera.Position.X - 1.0F, Camera.Position.Y, Camera.Position.Z - 0.5F) + BattleScreen.BattleMapOffset, Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z), 0.04F, True, True, 1.0F, 0.0F)) + Animations.Add(New BAMove(New Vector3(Camera.Position.X - 1.0F, Camera.Position.Y, Camera.Position.Z - 0.5F) + BattleScreen.BattleMapOffset, Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z), 0.04F, True, True, 1.0F, 0.0F,,, 3)) Case 1 BattleScreen.OppPokemonNPC.Visible = False - Animations.Add(New BAMove(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z), 0.01F, 0.0F, 6.0F)) + Animations.Add(New BAMove(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z), 0.01F, False, False, 0.0F, 6.0F,,, 3)) Dim Size As New BASize(BattleScreen.OppPokemonNPC.Position, BattleScreen.OppPokemonNPC.Textures(0), BattleScreen.OppPokemonNPC.Scale, False, New Vector3(0.05F), 0.02F, 0.0F, 0.0F, "1") Animations.Add(Size) Case 2 - Animations.Add(New BAMove(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), 0.02F, 0.0F, 6.0F)) + Animations.Add(New BAMove(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), 0.02F, False, False, 0.0F, 6.0F,,, 3)) Case 3, 5 Animations.Add(New BARotation(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(0, 0, 0.05F), New Vector3(0, 0, 1.0F), 0.0F, 4.0F, False, False, True, True)) Case 4, 6 @@ -290,9 +290,9 @@ For i = 0 To 2 Dim v As Vector3 = New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z) - Animations.Add(New BAMove(v, TextureManager.GetTexture("Textures\Battle\Other\Star"), New Vector3(0.1F), New Vector3(v.X, v.Y + 0.4F, v.Z - ((1 - i) * 0.4F)), 0.01F, 0.0F, 0.0F)) + Animations.Add(New BAMove(v, TextureManager.GetTexture("Textures\Battle\Other\Star"), New Vector3(0.1F), New Vector3(v.X, v.Y + 0.4F, v.Z - ((1 - i) * 0.4F)), 0.01F, False, False, 0.0F, 0.0F,,, 3)) Next - Animations.Add(New BAMove(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), 0.02F, 0.0F, 6.0F)) + Animations.Add(New BAMove(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), 0.02F, False, False, 0.0F, 6.0F,,, 3)) Case 8 Animations.Add(New BAOpacity(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), 0.01F, False, 0.0F, 0.0F, 0.0F)) Case 21 ' Break Animation