From e62c49b7bb66a255d8909fd9e969c79e52251e15 Mon Sep 17 00:00:00 2001 From: "Jasper \"JappaWakka\" Speelman" Date: Thu, 7 Apr 2022 12:01:32 +0200 Subject: [PATCH] Potential bugfix for 2x debug move on water --- P3D/Entites/Enviroment/AnimatedBlock.vb | 4 +++- P3D/Entites/Enviroment/Water.vb | 4 +++- P3D/Overworld/OverworldCamera.vb | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/P3D/Entites/Enviroment/AnimatedBlock.vb b/P3D/Entites/Enviroment/AnimatedBlock.vb index 23396f285..a77c11de7 100644 --- a/P3D/Entites/Enviroment/AnimatedBlock.vb +++ b/P3D/Entites/Enviroment/AnimatedBlock.vb @@ -109,7 +109,9 @@ Next If canSurf = True Then - Screen.Camera.Move(1) + If CType(Screen.Camera, OverworldCamera)._debugWalk = False Then + Screen.Camera.Move(1) + End If Screen.Level.PokemonEncounter.TryEncounterWildPokemon(Me.Position, Spawner.EncounterMethods.Surfing, "") End If diff --git a/P3D/Entites/Enviroment/Water.vb b/P3D/Entites/Enviroment/Water.vb index 830d0aaf6..1a507a070 100644 --- a/P3D/Entites/Enviroment/Water.vb +++ b/P3D/Entites/Enviroment/Water.vb @@ -92,7 +92,9 @@ Next If canSurf = True Then - Screen.Camera.Move(1) + If CType(Screen.Camera, OverworldCamera)._debugWalk = False Then + Screen.Camera.Move(1) + End If Screen.Level.PokemonEncounter.TryEncounterWildPokemon(Me.Position, Spawner.EncounterMethods.Surfing, "") End If diff --git a/P3D/Overworld/OverworldCamera.vb b/P3D/Overworld/OverworldCamera.vb index dd3bab730..f08d8c5ba 100644 --- a/P3D/Overworld/OverworldCamera.vb +++ b/P3D/Overworld/OverworldCamera.vb @@ -848,7 +848,7 @@ Public Class OverworldCamera End If If GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then - If _debugWalk = True Then + If _debugWalk = True AndAlso CType(Core.CurrentScreen, OverworldScreen).ActionScript.IsReady = True Then cannotWalk = False End If End If