From ca9f3f98a9d8bd718f11806a33e7a9a2ab284de5 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Sun, 18 Dec 2005 00:38:30 +0000 Subject: Made the handlers use the countedPtr for Beings as they should. Fixed a segfault when removing a being from the world. --- src/connectionhandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/connectionhandler.cpp') diff --git a/src/connectionhandler.cpp b/src/connectionhandler.cpp index 9ff5061..5218618 100644 --- a/src/connectionhandler.cpp +++ b/src/connectionhandler.cpp @@ -248,12 +248,12 @@ void ConnectionHandler::registerHandler( handlers[msgId] = handler; } -void ConnectionHandler::sendTo(tmwserv::Being *being, MessageOut &msg) +void ConnectionHandler::sendTo(tmwserv::BeingPtr beingPtr, MessageOut &msg) { for (NetComputers::iterator i = clients.begin(); i != clients.end(); i++) { - if ((*i)->getCharacter() == being) { + if ((*i)->getCharacter().get() == beingPtr.get()) { (*i)->send(msg.getPacket()); break; } -- cgit