summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-02-14 21:11:20 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-02-14 21:12:44 +0100
commitf70ce630b46df7d66d9297a1c59cf3ec6c81aa39 (patch)
tree79014d108f5c32fe4241bf9f27d2626497899096 /src
parentd561e29ff52e7d9020d3387bbe0592094cafafaf (diff)
downloadmana-client-f70ce630b46df7d66d9297a1c59cf3ec6c81aa39.tar.gz
mana-client-f70ce630b46df7d66d9297a1c59cf3ec6c81aa39.tar.bz2
mana-client-f70ce630b46df7d66d9297a1c59cf3ec6c81aa39.tar.xz
mana-client-f70ce630b46df7d66d9297a1c59cf3ec6c81aa39.zip
Initialize dialog variable to avoid compiler warning
Compiler warning seems unjustified, but the code could make this more clear.
Diffstat (limited to 'src')
-rw-r--r--src/net/ea/npchandler.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/net/ea/npchandler.cpp b/src/net/ea/npchandler.cpp
index 6fb719a1..fc81ca03 100644
--- a/src/net/ea/npchandler.cpp
+++ b/src/net/ea/npchandler.cpp
@@ -57,8 +57,6 @@ NpcHandler::NpcHandler()
void NpcHandler::handleMessage(Net::MessageIn &msg)
{
- bool resetPlayer = true;
-
if (msg.getId() == SMSG_NPC_CHOICE || msg.getId() == SMSG_NPC_MESSAGE)
{
msg.readInt16(); // length
@@ -66,7 +64,7 @@ void NpcHandler::handleMessage(Net::MessageIn &msg)
int npcId = msg.readInt32();
NpcDialogs::iterator diag = mNpcDialogs.find(npcId);
- NpcDialog *dialog;
+ NpcDialog *dialog = 0;
if (diag == mNpcDialogs.end())
{
@@ -124,7 +122,7 @@ void NpcHandler::handleMessage(Net::MessageIn &msg)
break;
}
- if (resetPlayer && player_node->getCurrentAction() != Being::SIT)
+ if (player_node->getCurrentAction() != Being::SIT)
player_node->setAction(Being::STAND);
}