From c8a486de6c1c9875d5c0421dcc985c4f58340218 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sat, 8 Apr 2017 16:02:59 +0300 Subject: [PATCH] [Client] Fix Ptr initialization in mwmp::Cell --- apps/openmw/mwmp/Cell.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwmp/Cell.cpp b/apps/openmw/mwmp/Cell.cpp index 5c7dc594b..d64514412 100644 --- a/apps/openmw/mwmp/Cell.cpp +++ b/apps/openmw/mwmp/Cell.cpp @@ -36,7 +36,7 @@ void Cell::updateLocal() LocalActor *actor = it->second; // TODO:: Make sure this condition actually works - if (actor->getPtr().getCell() && actor->getPtr().getCell() != store) + if (actor->getPtr().getCell() != store) { LOG_APPEND(Log::LOG_INFO, "- Removing LocalActor %s which is no longer in this cell", it->first.c_str()); actor->getPtr().getBase()->isLocalActor = false; @@ -168,7 +168,7 @@ void Cell::initializeLocalActors() for (typename MWWorld::CellRefList::List::iterator listIter(npcList->mList.begin()); listIter != npcList->mList.end(); ++listIter) { - MWWorld::Ptr ptr(&*listIter, 0); + MWWorld::Ptr ptr(&*listIter, store); LocalActor *actor = new LocalActor(); actor->cell = esmCell;