]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/network/clientpackethandler.cpp
Cleanup sound manager class (#7158)
[dragonfireclient.git] / src / network / clientpackethandler.cpp
index aa4d8c244960dd69ede7653452f08a95721c4040..37b6493647ba626f615291281a49a6658cad1098 100644 (file)
@@ -32,6 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "server.h"
 #include "util/strfnd.h"
 #include "client/clientevent.h"
+#include "client/sound.h"
 #include "network/clientopcodes.h"
 #include "network/connection.h"
 #include "script/scripting_client.h"
@@ -358,30 +359,6 @@ void Client::handleCommand_TimeOfDay(NetworkPacket* pkt)
                        << " dr=" << dr << std::endl;
 }
 
-void Client::handleCommand_ChatMessageOld(NetworkPacket *pkt)
-{
-       /*
-               u16 command
-               u16 length
-               wstring message
-       */
-       u16 len, read_wchar;
-
-       *pkt >> len;
-
-       std::wstring message;
-       for (u32 i = 0; i < len; i++) {
-               *pkt >> read_wchar;
-               message += (wchar_t)read_wchar;
-       }
-
-       // If chat message not consummed by client lua API
-       // @TODO send this to CSM using ChatMessage object
-       if (!moddingEnabled() || !m_script->on_receiving_message(wide_to_utf8(message))) {
-               pushToChatQueue(new ChatMessage(message));
-       }
-}
-
 void Client::handleCommand_ChatMessage(NetworkPacket *pkt)
 {
        /*