diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-02-14 21:11:20 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-02-14 21:12:44 +0100 |
commit | f70ce630b46df7d66d9297a1c59cf3ec6c81aa39 (patch) | |
tree | 79014d108f5c32fe4241bf9f27d2626497899096 /src/net/ea/npchandler.cpp | |
parent | d561e29ff52e7d9020d3387bbe0592094cafafaf (diff) | |
download | mana-f70ce630b46df7d66d9297a1c59cf3ec6c81aa39.tar.gz mana-f70ce630b46df7d66d9297a1c59cf3ec6c81aa39.tar.bz2 mana-f70ce630b46df7d66d9297a1c59cf3ec6c81aa39.tar.xz mana-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/net/ea/npchandler.cpp')
-rw-r--r-- | src/net/ea/npchandler.cpp | 6 |
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); } |