Skip to content

Commit 61e899e

Browse files
committed
Fix creeping animation bug.
1 parent 7c84900 commit 61e899e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

player/stickplayer.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,16 @@ public override void _PhysicsProcess(double delta)
117117
_watch.Start();
118118
}
119119

120-
if (State != PlayerState.Lie && Input.IsActionPressed("ui_down"))
120+
if (State != PlayerState.Lie && State != PlayerState.Creep && Input.IsActionPressed("ui_down"))
121121
{
122+
Console.WriteLine("State при Sit:" + State);
122123
State = PlayerState.Sit;
123124
}
124125

125-
if (State != PlayerState.Lie && velocity.X != 0 && Input.IsActionPressed("ui_down") &&
126+
if (State != PlayerState.Lie && State != PlayerState.Creep && velocity.X != 0 && Input.IsActionPressed("ui_down") &&
126127
(Input.IsActionPressed("ui_left") || Input.IsActionPressed("ui_right")))
127128
{
129+
Console.WriteLine("State при SitWalk: " + State);
128130
State = PlayerState.SitWalk;
129131
}
130132

0 commit comments

Comments
 (0)