diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-01-15 01:07:47 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-01-15 02:05:50 +0200 |
commit | e2150d04662a4ba8b5304dabcc74be0bacded5b7 (patch) | |
tree | cbeb05c2f056a7d5ac4a08e7b80799b5cfd4785b /src/localplayer.cpp | |
parent | edda37acb9d66f2751ef712c83dced62428fa685 (diff) | |
download | manaverse-e2150d04662a4ba8b5304dabcc74be0bacded5b7.tar.gz manaverse-e2150d04662a4ba8b5304dabcc74be0bacded5b7.tar.bz2 manaverse-e2150d04662a4ba8b5304dabcc74be0bacded5b7.tar.xz manaverse-e2150d04662a4ba8b5304dabcc74be0bacded5b7.zip |
Fix code style, apply some fixes after checking with cppcheck from git.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 10 |
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()) |