mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-28 00:04:33 +02:00
Added PreventMovement property and commands
"@player.preventmovement" Makes the player unable to move, while still keeping control over the menu, interactions etc. "@player.allowmovement" Gives the player back their ability to move.
This commit is contained in:
parent
d4d53ba0ea
commit
653fc249d1
@ -26,6 +26,7 @@ Public Class OverworldCamera
|
||||
Private _scrollSpeed As Single = 0F
|
||||
Private _scrollDirection As Integer = 1
|
||||
Public _moved As Single = 0F
|
||||
Public PreventMovement As Boolean = False
|
||||
|
||||
Public LastStepPosition As Vector3 = New Vector3(0, -2, 0)
|
||||
Public YawLocked As Boolean = False
|
||||
@ -634,7 +635,7 @@ Public Class OverworldCamera
|
||||
isActionscriptReady = OS.ActionScript.IsReady
|
||||
End If
|
||||
|
||||
If isActionscriptReady = True AndAlso ScriptBlock.TriggeredScriptBlock = False And Screen.Level.CanMove() = True Then
|
||||
If isActionscriptReady = True AndAlso ScriptBlock.TriggeredScriptBlock = False AndAlso Screen.Level.CanMove() = True AndAlso PreventMovement = False Then
|
||||
If _thirdPerson = False And _cameraFocusType = CameraFocusTypes.Player Then
|
||||
FirstPersonMovement()
|
||||
Else
|
||||
|
@ -203,6 +203,14 @@
|
||||
Case "stopmovement"
|
||||
Screen.Camera.StopMovement()
|
||||
|
||||
IsReady = True
|
||||
Case "preventmovement"
|
||||
CType(Screen.Camera, OverworldCamera).PreventMovement = True
|
||||
|
||||
IsReady = True
|
||||
Case "allowmovement"
|
||||
CType(Screen.Camera, OverworldCamera).PreventMovement = False
|
||||
|
||||
IsReady = True
|
||||
Case "money", "addmoney"
|
||||
Core.Player.Money += int(argument)
|
||||
|
Loading…
x
Reference in New Issue
Block a user