From f70ce630b46df7d66d9297a1c59cf3ec6c81aa39 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sun, 14 Feb 2010 21:11:20 +0100 Subject: Initialize dialog variable to avoid compiler warning Compiler warning seems unjustified, but the code could make this more clear. --- src/net/ea/npchandler.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') 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); } -- cgit v1.2.3-70-g09d2