Fix for StrengthRock softlock

This commit is contained in:
JappaWakka 2023-03-09 17:14:56 +01:00
parent ad6c008a98
commit 9a7543fb33
4 changed files with 14 additions and 5 deletions

View File

@ -431,6 +431,9 @@
If Me.Moved <= 0.0F Then
Me.Moved = 0.0F
If Me.EntityID.ToLower = "strengthrock" Then
CType(Screen.Camera, OverworldCamera).IsPushingStrengthRock = False
End If
Me.Position.X = CInt(Me.Position.X)
Me.Position.Z = CInt(Me.Position.Z)

View File

@ -62,11 +62,15 @@
End Sub
Public Overrides Sub Update()
If CType(Screen.Camera, OverworldCamera).IsPushingStrengthRock = False Then
If Me.ActivateScript = True And Screen.Camera.Position.X = Me.Position.X And Screen.Camera.Position.Z = Me.Position.Z And CInt(Screen.Camera.Position.Y) = CInt(Me.Position.Y) Then
Screen.Camera.StopMovement()
ActivateScript = False
TriggerScript(False)
End If
Else
TriggeredScriptBlock = False
End If
MyBase.Update()
End Sub

View File

@ -85,6 +85,7 @@
newPosition.Z += Screen.Camera.GetMoveDirection().Z
If CheckCollision(newPosition) = True Then
CType(Screen.Camera, OverworldCamera).IsPushingStrengthRock = True
Me.Moved = 1
Me.FaceDirection = Screen.Camera.GetPlayerFacingDirection()
SoundManager.PlaySound("destroy", False)

View File

@ -32,6 +32,7 @@ Public Class OverworldCamera
Public YawLocked As Boolean = False
Public ThirdPersonOffset As Vector3 = New Vector3(0F, 0.3F, 1.5F)
Public IsSliding As Boolean = False
Public IsPushingStrengthRock As Boolean = False
'Debug variables
Public oldDate As Date = Date.Now
@ -796,7 +797,7 @@ Public Class OverworldCamera
Move(walkSteps)
Else
'Walked against something, set player transparent
If Screen.Level.Surfing = False Then
If Screen.Level.Surfing = False AndAlso IsPushingStrengthRock = False Then
If _thirdPerson = True Then
If _didWalkAgainst = True Then
Screen.Level.OwnPlayer.Opacity = 0.5F