From 964ffbb9b6ed5246b14a7d0c0d065f7d38af0912 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Sun, 27 Mar 2011 21:41:20 +0300
Subject: Fix some warnings and improve code from gcc 4.6 compilation.

---
 src/net/net.cpp                |  6 ++----
 src/net/tmwa/playerhandler.cpp | 15 ++++++++++++---
 2 files changed, 14 insertions(+), 7 deletions(-)

(limited to 'src/net')

diff --git a/src/net/net.cpp b/src/net/net.cpp
index 89f63cce3..7d530940a 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -166,11 +166,9 @@ void connectToServer(const ServerInfo &server)
                 break;
 #endif
             case ServerInfo::TMWATHENA:
-                new TmwAthena::GeneralHandler;
-                break;
-
+            case ServerInfo::UNKNOWN:
             default:
-                // Shouldn't happen...
+                new TmwAthena::GeneralHandler;
                 break;
         }
 
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 6078dd761..3f8bdab7b 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -707,9 +707,18 @@ void PlayerHandler::changeAction(Being::Action action)
     char type;
     switch (action)
     {
-        case Being::SIT: type = 2; break;
-        case Being::STAND: type = 3; break;
-        default: return;
+        case Being::SIT:
+            type = 2;
+            break;
+        case Being::STAND:
+            type = 3;
+            break;
+        default:
+        case Being::MOVE:
+        case Being::ATTACK:
+        case Being::DEAD:
+        case Being::HURT:
+            return;
     }
 
     MessageOut outMsg(CMSG_PLAYER_CHANGE_ACT);
-- 
cgit v1.2.3-70-g09d2