summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp5
-rw-r--r--src/gui/chatwindow.cpp17
-rw-r--r--src/net/ea/beinghandler.cpp2
3 files changed, 18 insertions, 6 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 1265d048f..c1fde21d2 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -348,10 +348,15 @@ void Client::gameInit()
bindTextDomain("manaplus", (std::string(PHYSFS_getBaseDir())
+ "../locale/").c_str());
#else
+#ifdef __APPLE__
+ //TODO: Use physfs instead of absolute path.
+ bindTextDomain("manaplus", "ManaPlus.app/Contents/Resources/locale/");
+#else
bindTextDomain("manaplus", LOCALEDIR);
#endif
#endif
#endif
+#endif
char *locale = setlocale(LC_MESSAGES, lang.c_str());
if (locale)
logger->log("locale: %s", locale);
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 11f399537..c0258eade 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -1410,12 +1410,19 @@ void ChatWindow::resortChatLog(std::string line, Own own,
return;
}
- const size_t idx = line.find(": \302\202");
- if (idx != std::string::npos)
+ const size_t idx2 = line.find(": ");
+ if (idx2 != std::string::npos)
{
- line = line.erase(idx + 2, 2);
- tradeChatTab->chatLog(line, own, ignoreRecord, tryRemoveColors);
- return;
+ const size_t idx = line.find(": \302\202");
+ if (idx == idx2)
+ {
+ // ignore special message formats.
+ if (line.find(": \302\202\302") != std::string::npos)
+ return;
+ line = line.erase(idx + 2, 2);
+ tradeChatTab->chatLog(line, own, ignoreRecord, tryRemoveColors);
+ return;
+ }
}
const size_t idx1 = line.find("@@");
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index 528608d7e..bb7b7bc67 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -691,7 +691,7 @@ void BeingHandler::processBeingChangeDirection(Net::MessageIn &msg)
msg.readInt16(); // unused
- const unsigned char dir = msg.readInt8();
+ const unsigned char dir = msg.readInt8() & 0x0f;
dstBeing->setDirection(dir);
if (player_node)
player_node->imitateDirection(dstBeing, dir);