mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-27 15:54:25 +02:00
BattleScreen + BattleCatchScreen softlock fixes
This commit is contained in:
parent
9970d892de
commit
dfbaaf2b33
@ -7,11 +7,18 @@
|
|||||||
Moves
|
Moves
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
|
Public CanInteract As Boolean = True
|
||||||
Public MenuState As MenuStates = MenuStates.Main
|
Public MenuState As MenuStates = MenuStates.Main
|
||||||
Public Visible As Boolean = False
|
Public Visible As Boolean = False
|
||||||
|
|
||||||
Public Sub New()
|
Public Sub New()
|
||||||
Me.Reset()
|
Me.Reset()
|
||||||
|
Dim blockinteractscreen() As Screen.Identifications = {Screen.Identifications.PartyScreen, Screen.Identifications.SummaryScreen, Screen.Identifications.PauseScreen, Screen.Identifications.ChatScreen}
|
||||||
|
If blockinteractscreen.Contains(Core.CurrentScreen.Identification) = True Then
|
||||||
|
CanInteract = False
|
||||||
|
Else
|
||||||
|
CanInteract = True
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub Reset()
|
Public Sub Reset()
|
||||||
@ -193,9 +200,9 @@
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim cX As Integer = 0
|
Dim cX As Integer = 0
|
||||||
If HPpercentage <= 50.0F And HPpercentage > 15.0F Then
|
If HPpercentage <= 75.0F And HPpercentage > 25.0F Then
|
||||||
cX = 2
|
cX = 2
|
||||||
ElseIf HPpercentage <= 15.0F Then
|
ElseIf HPpercentage <= 25.0F Then
|
||||||
cX = 4
|
cX = 4
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -307,12 +314,14 @@
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub Update(ByRef BattleScreen As BattleScreen)
|
Public Sub Update(ByRef BattleScreen As BattleScreen)
|
||||||
Select Case MenuState
|
If CanInteract = True Then
|
||||||
Case MenuStates.Main
|
Select Case MenuState
|
||||||
UpdateMainMenu(BattleScreen)
|
Case MenuStates.Main
|
||||||
Case MenuStates.Moves
|
UpdateMainMenu(BattleScreen)
|
||||||
UpdateMoveMenu(BattleScreen)
|
Case MenuStates.Moves
|
||||||
End Select
|
UpdateMoveMenu(BattleScreen)
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private _allItemsExtended As Integer = 0
|
Private _allItemsExtended As Integer = 0
|
||||||
|
@ -1025,11 +1025,13 @@ nextIndexForeground:
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Lighting.UpdateLighting(Screen.Effect)
|
Lighting.UpdateLighting(Screen.Effect)
|
||||||
Camera.Update()
|
If IsCurrentScreen() = True Then
|
||||||
Level.Update()
|
Camera.Update()
|
||||||
|
|
||||||
SkyDome.Update()
|
Level.Update()
|
||||||
|
|
||||||
|
SkyDome.Update()
|
||||||
|
End If
|
||||||
TextBox.Update()
|
TextBox.Update()
|
||||||
If TextBox.Showing = False Then
|
If TextBox.Showing = False Then
|
||||||
Dim cIndex As Integer = 0
|
Dim cIndex As Integer = 0
|
||||||
|
@ -58,9 +58,11 @@
|
|||||||
Me._textIndex = Me._text.Length
|
Me._textIndex = Me._text.Length
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Controls.Accept(True, True) = True Then
|
If CurrentScreen.Identification <> Screen.Identifications.PauseScreen AndAlso CurrentScreen.Identification <> Screen.Identifications.ChatScreen Then
|
||||||
SoundManager.PlaySound("select")
|
If Controls.Accept(True, True) = True Then
|
||||||
Me._ready = True
|
SoundManager.PlaySound("select")
|
||||||
|
Me._ready = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
@ -61,9 +61,11 @@ Public Class ChatScreen
|
|||||||
'Updates the level screen so online player entities get drawn.
|
'Updates the level screen so online player entities get drawn.
|
||||||
If PreScreen.Identification = Identifications.OverworldScreen And JoinServerScreen.Online = True Then
|
If PreScreen.Identification = Identifications.OverworldScreen And JoinServerScreen.Online = True Then
|
||||||
Screen.Level.Update()
|
Screen.Level.Update()
|
||||||
End If
|
ElseIf PreScreen.Identification = Screen.Identifications.BattleScreen Then
|
||||||
If PreScreen.Identification = Screen.Identifications.BattleScreen Then
|
|
||||||
PreScreen.Update()
|
PreScreen.Update()
|
||||||
|
ElseIf PreScreen.Identification = Identifications.BattleCatchScreen Then
|
||||||
|
PreScreen.Update()
|
||||||
|
CType(PreScreen, BattleCatchScreen).UpdateAnimations()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CursorDelay > 0 Then
|
If CursorDelay > 0 Then
|
||||||
|
@ -587,6 +587,9 @@ Public Class NewInventoryScreen
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Overrides Sub Update()
|
Public Overrides Sub Update()
|
||||||
|
If PreScreen.Identification = Screen.Identifications.BattleScreen Then
|
||||||
|
PreScreen.Update()
|
||||||
|
End If
|
||||||
'Updates the tab highlight:
|
'Updates the tab highlight:
|
||||||
For index = 0 To _tabHighlight.Length - 1
|
For index = 0 To _tabHighlight.Length - 1
|
||||||
If index <> _tabIndex Then
|
If index <> _tabIndex Then
|
||||||
|
@ -82,7 +82,10 @@
|
|||||||
If PreScreen.Identification = Identifications.OverworldScreen Then
|
If PreScreen.Identification = Identifications.OverworldScreen Then
|
||||||
Screen.Level.Update()
|
Screen.Level.Update()
|
||||||
ElseIf PreScreen.Identification = Identifications.BattleCatchScreen Then
|
ElseIf PreScreen.Identification = Identifications.BattleCatchScreen Then
|
||||||
|
PreScreen.Update()
|
||||||
CType(PreScreen, BattleCatchScreen).UpdateAnimations()
|
CType(PreScreen, BattleCatchScreen).UpdateAnimations()
|
||||||
|
ElseIf PreScreen.Identification = Screen.Identifications.BattleScreen Then
|
||||||
|
PreScreen.Update()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Screen.TextBox.reDelay = 0.0F
|
Screen.TextBox.reDelay = 0.0F
|
||||||
|
@ -420,6 +420,9 @@ Public Class PartyScreen
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Overrides Sub Update()
|
Public Overrides Sub Update()
|
||||||
|
If PreScreen.Identification = Screen.Identifications.BattleScreen Then
|
||||||
|
PreScreen.Update()
|
||||||
|
End If
|
||||||
If _pokemonAnimations.Count > 0 Then
|
If _pokemonAnimations.Count > 0 Then
|
||||||
Dim animation As PokemonAnimation = _pokemonAnimations(_index)
|
Dim animation As PokemonAnimation = _pokemonAnimations(_index)
|
||||||
If animation._shakeLeft Then
|
If animation._shakeLeft Then
|
||||||
|
@ -593,6 +593,9 @@
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub Update()
|
Public Overrides Sub Update()
|
||||||
|
If PreScreen.PreScreen.Identification = Screen.Identifications.BattleScreen Then
|
||||||
|
PreScreen.PreScreen.Update()
|
||||||
|
End If
|
||||||
If _closing = True Then
|
If _closing = True Then
|
||||||
If _fadeIn > 0F Then
|
If _fadeIn > 0F Then
|
||||||
_fadeIn = MathHelper.Lerp(0, _fadeIn, 0.8F)
|
_fadeIn = MathHelper.Lerp(0, _fadeIn, 0.8F)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user