diff --git a/P3D/Entites/Other/OwnPlayer.vb b/P3D/Entites/Other/OwnPlayer.vb index 31c2dee48..8e919b016 100644 --- a/P3D/Entites/Other/OwnPlayer.vb +++ b/P3D/Entites/Other/OwnPlayer.vb @@ -84,18 +84,24 @@ End Sub Private Sub Move() - If (Screen.Camera.IsMoving() = True And Me.DoAnimation = True) OrElse (Screen.Level.OwnPlayer IsNot Nothing AndAlso Screen.Level.OwnPlayer.isDancing) Then - If CurrentScreen.Identification <> Screen.Identifications.PauseScreen Then - Me.AnimationDelay -= 0.13F - If AnimationDelay <= 0.0F Then - AnimationDelay = GetAnimationDelay() - AnimationX += 1 - If AnimationX > 4 Then - AnimationX = 1 + If Core.Player.DoWalkAnimation = True Then + If (Screen.Camera.IsMoving() = True And Me.DoAnimation = True) OrElse (Screen.Level.OwnPlayer IsNot Nothing AndAlso Screen.Level.OwnPlayer.isDancing) Then + If CurrentScreen.Identification <> Screen.Identifications.PauseScreen Then + Me.AnimationDelay -= 0.13F + If AnimationDelay <= 0.0F Then + AnimationDelay = GetAnimationDelay() + AnimationX += 1 + If AnimationX > 4 Then + AnimationX = 1 + End If End If + Else + AnimationX = 1 + ChangeTexture() End If Else AnimationX = 1 + AnimationDelay = GetAnimationDelay() ChangeTexture() End If Else diff --git a/P3D/Player/Player.vb b/P3D/Player/Player.vb index 7839cf72f..bfb85420f 100644 --- a/P3D/Player/Player.vb +++ b/P3D/Player/Player.vb @@ -453,6 +453,8 @@ Public RunMode As Boolean = True Public RunToggled As Boolean = False + Public DoWalkAnimation As Boolean = False + Public Structure Temp Public Shared PokemonScreenIndex As Integer = 0 Public Shared PokemonStatusPageIndex As Integer = 0 diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb index bd1831103..a63393786 100644 --- a/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb +++ b/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb @@ -376,6 +376,10 @@ Dim newOpacity As Single = sng(argument.Replace("~", Screen.Level.OwnPlayer.Opacity.ToString().Replace(".", GameController.DecSeparator))) Screen.Level.OwnPlayer.Opacity = newOpacity IsReady = True + Case "dowalkanimation" + Dim doWalkAnimation As Boolean = CBool(argument) + Core.Player.DoWalkAnimation = doWalkAnimation + IsReady = True Case "quitgame" 'Reset VoltorbFlipScreen's Variables VoltorbFlip.VoltorbFlipScreen.CurrentLevel = 1 diff --git a/P3D/World/ActionScript/V2/ScriptLibrary.vb b/P3D/World/ActionScript/V2/ScriptLibrary.vb index 1e4790dce..50b060d18 100644 --- a/P3D/World/ActionScript/V2/ScriptLibrary.vb +++ b/P3D/World/ActionScript/V2/ScriptLibrary.vb @@ -534,6 +534,7 @@ Namespace ScriptVersion2 r(New ScriptCommand("player", "setrivalskin", {New ScriptArgument("skin", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Sets the rival's skin.")) r(New ScriptCommand("player", "setopacity", {New ScriptArgument("opacity", ScriptArgument.ArgumentTypes.Sng)}.ToList(), "Sets the player entity's opacity.")) r(New ScriptCommand("player", "QuitGame", {New ScriptArgument("doFade", ScriptArgument.ArgumentTypes.Bool, True, "")}.ToList(), "Quits the game and goes back to the Main Menu (with optionally a fade out and in).")) + r(New ScriptCommand("player", "DoWalkAnimation", {New ScriptArgument("walkAnimation", ScriptArgument.ArgumentTypes.Bool)}.ToList(), "Enables or disables the player's walking animation when walking or during a @player.move command.")) ' Constructs: r(New ScriptCommand("player", "position", "sngarr", {New ScriptArgument("coordinate", ScriptArgument.ArgumentTypes.StrArr, {"x", "y", "z"}, True, "")}.ToList(), "Returns the position of the player. The normal coordinate combination is ""X,Y,Z"".", ",", True))