Using the running shoes and using ctrl to walk through walls in sandbox and debug mode is not a toggle instead of a hold

This commit is contained in:
JappaWakka 2021-10-13 20:18:26 +02:00
parent e6e44cec29
commit a654d80a85
4 changed files with 30 additions and 9 deletions

View File

@ -4,6 +4,7 @@ Public Class KeyBindings
Public Shared LeftMoveKey As Keys = Keys.A
Public Shared BackwardMoveKey As Keys = Keys.S
Public Shared RightMoveKey As Keys = Keys.D
Public Shared RunKey As Keys = Keys.LeftShift
Public Shared OpenInventoryKey As Keys = Keys.E
Public Shared ChatKey As Keys = Keys.T
@ -24,6 +25,7 @@ Public Class KeyBindings
Public Shared LightKey As Keys = Keys.F4
Public Shared PerspectiveSwitchKey As Keys = Keys.F5
Public Shared FullScreenKey As Keys = Keys.F11
Public Shared DebugWalkKey As Keys = Keys.LeftControl
Public Shared EnterKey1 As Keys = Keys.Enter
Public Shared EnterKey2 As Keys = Keys.Space
@ -54,6 +56,8 @@ Public Class KeyBindings
BackwardMoveKey = binding
Case "rightmove"
RightMoveKey = binding
Case "run"
RunKey = binding
Case "inventory"
OpenInventoryKey = binding
Case "chat"
@ -78,6 +82,8 @@ Public Class KeyBindings
ScreenshotKey = binding
Case "debugcontrol"
DebugKey = binding
Case "debugwalk"
DebugWalkKey = binding
Case "perspectiveswitch"
PerspectiveSwitchKey = binding
Case "fullscreen"
@ -235,6 +241,7 @@ Public Class KeyBindings
"[LeftMove]=" & GetKeyName(Keys.A) & Environment.NewLine &
"[BackwardMove]=" & GetKeyName(Keys.S) & Environment.NewLine &
"[RightMove]=" & GetKeyName(Keys.D) & Environment.NewLine &
"[Run]=" & GetKeyName(Keys.LeftShift) & Environment.NewLine &
"[Inventory]=" & GetKeyName(Keys.E) & Environment.NewLine &
"[Chat]=" & GetKeyName(Keys.T) & Environment.NewLine &
"[Special]=" & GetKeyName(Keys.Q) & Environment.NewLine &
@ -247,6 +254,7 @@ Public Class KeyBindings
"[GUIControl]=" & GetKeyName(Keys.F1) & Environment.NewLine &
"[ScreenShot]=" & GetKeyName(Keys.F2) & Environment.NewLine &
"[DebugControl]=" & GetKeyName(Keys.F3) & Environment.NewLine &
"[DebugWalkKey]=" & GetKeyName(Keys.LeftControl) & Environment.NewLine &
"[LightKey]=" & GetKeyName(Keys.F4) & Environment.NewLine &
"[PerspectiveSwitch]=" & GetKeyName(Keys.F5) & Environment.NewLine &
"[FullScreen]=" & GetKeyName(Keys.F11) & Environment.NewLine &
@ -270,6 +278,7 @@ Public Class KeyBindings
"[LeftMove]=" & GetKeyName(LeftMoveKey) & Environment.NewLine &
"[BackwardMove]=" & GetKeyName(BackwardMoveKey) & Environment.NewLine &
"[RightMove]=" & GetKeyName(RightMoveKey) & Environment.NewLine &
"[Run]=" & GetKeyName(RunKey) & Environment.NewLine &
"[Inventory]=" & GetKeyName(OpenInventoryKey) & Environment.NewLine &
"[Chat]=" & GetKeyName(ChatKey) & Environment.NewLine &
"[Special]=" & GetKeyName(SpecialKey) & Environment.NewLine &

View File

@ -14,6 +14,7 @@ Public Class OverworldCamera
Private _cPosition As Vector3 = Vector3.Zero 'Actual camera position.
Private _isFixed As Boolean = False
Private _aimDirection As Integer = -1 'The direction the camera is aiming to face.
Public _debugWalk As Boolean
Private _bobbingTemp As Single = 0F
Private _tempDirectionPressed As Integer = -1
@ -168,6 +169,16 @@ Public Class OverworldCamera
#Region "Update"
Public Overrides Sub Update()
If KeyBoardHandler.KeyPressed(KeyBindings.DebugWalkKey) = True Then
_debugWalk = Not _debugWalk
End If
If KeyBoardHandler.KeyPressed(KeyBindings.RunKey) = True Or ControllerHandler.ButtonPressed(Buttons.B) = True Then
If Screen.Level.Riding = False And Screen.Level.Surfing = False And Core.Player.Inventory.HasRunningShoes = True Then
Core.Player.RunToggled = Not Core.Player.RunToggled
End If
End If
Ray = CreateRay()
PlayerMovement()
@ -838,9 +849,8 @@ Public Class OverworldCamera
End If
End If
'DebugFeature:
If GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then
If KeyBoardHandler.KeyDown(Keys.LeftControl) = True Then
If _debugWalk = True Then
cannotWalk = False
End If
End If

View File

@ -14719,6 +14719,9 @@
<Content Include="Content\Sounds\Battle\Exp_Fill.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Sounds\Battle\Pokeball\break.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Sounds\Battle\Pokeball\catch.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@ -15349,6 +15352,9 @@
<Content Include="Content\Sounds\Receive_PhoneNumber.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Sounds\Success_Caught.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Sounds\Use_Item.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

View File

@ -431,6 +431,8 @@
Public PlayerTemp As New PlayerTemp()
Public RunToggled As Boolean = False
Public Structure Temp
Public Shared PokemonScreenIndex As Integer = 0
Public Shared PokemonStatusPageIndex As Integer = 0
@ -2015,13 +2017,7 @@
End Function
Public Function IsRunning() As Boolean
If KeyBoardHandler.KeyDown(Keys.LeftShift) = True Or ControllerHandler.ButtonDown(Buttons.B) = True Then
If Screen.Level.Riding = False And Screen.Level.Surfing = False And Inventory.HasRunningShoes = True Then
Return True
End If
End If
Return False
Return RunToggled
End Function
Public Sub Unload()