summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 207e71bf5..67ba0db3c 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -2184,17 +2184,15 @@ void LocalPlayer::crazyMoveA()
if (mCrazyMoveState >= mMoveProgram.length())
mCrazyMoveState = 0;
- Uint8 dir = 0;
-
// move command
if (mMoveProgram[mCrazyMoveState] == 'm')
{
- int dx = 0;
- int dy = 0;
-
mCrazyMoveState ++;
if (mCrazyMoveState < mMoveProgram.length())
{
+ int dx = 0;
+ int dy = 0;
+
char param = mMoveProgram[mCrazyMoveState++];
if (param == '?')
{
@@ -2246,6 +2244,8 @@ void LocalPlayer::crazyMoveA()
// direction command
else if (mMoveProgram[mCrazyMoveState] == 'd')
{
+ Uint8 dir = 0;
+
mCrazyMoveState ++;
if (mCrazyMoveState < mMoveProgram.length())