From 964ffbb9b6ed5246b14a7d0c0d065f7d38af0912 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 27 Mar 2011 21:41:20 +0300 Subject: Fix some warnings and improve code from gcc 4.6 compilation. --- src/localplayer.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/localplayer.cpp') diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 564c28f78..0533290b3 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -1173,9 +1173,16 @@ bool LocalPlayer::toggleSit() Being::Action newAction; switch (mAction) { - case STAND: newAction = SIT; break; - case SIT: newAction = STAND; break; - default: return true; + case STAND: newAction = SIT; + break; + case SIT: newAction = STAND; + break; + case MOVE: + case ATTACK: + case DEAD: + case HURT: + default: + return true; } Net::getPlayerHandler()->changeAction(newAction); -- cgit v1.2.3-70-g09d2