From e2150d04662a4ba8b5304dabcc74be0bacded5b7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 15 Jan 2011 01:07:47 +0200 Subject: Fix code style, apply some fixes after checking with cppcheck from git. --- src/localplayer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/localplayer.cpp') 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()) -- cgit v1.2.3-60-g2f50