diff --git a/apps/openmw/mwmp/Cell.cpp b/apps/openmw/mwmp/Cell.cpp index ddb3a0dad..4b29665c6 100644 --- a/apps/openmw/mwmp/Cell.cpp +++ b/apps/openmw/mwmp/Cell.cpp @@ -399,6 +399,9 @@ void Cell::readCellChange(ActorList& actorList) void Cell::initializeLocalActor(const MWWorld::Ptr& ptr) { + std::string mapIndex = Main::get().getCellController()->generateMapIndex(ptr); + LOG_APPEND(Log::LOG_VERBOSE, "- Initializing LocalActor %s in %s", mapIndex.c_str(), getDescription().c_str()); + LocalActor *actor = new LocalActor(); actor->cell = *store->getCell(); actor->setPtr(ptr); @@ -408,16 +411,17 @@ void Cell::initializeLocalActor(const MWWorld::Ptr& ptr) if (ptr.getClass().getCreatureStats(ptr).isDead()) actor->wasDead = true; - std::string mapIndex = Main::get().getCellController()->generateMapIndex(ptr); localActors[mapIndex] = actor; Main::get().getCellController()->setLocalActorRecord(mapIndex, getDescription()); - LOG_APPEND(Log::LOG_VERBOSE, "- Initialized LocalActor %s in %s", mapIndex.c_str(), getDescription().c_str()); + LOG_APPEND(Log::LOG_VERBOSE, "- Successfully initialized LocalActor %s in %s", mapIndex.c_str(), getDescription().c_str()); } void Cell::initializeLocalActors() { + LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Initializing LocalActors in %s", getDescription().c_str()); + for (const auto &mergedRef : store->getMergedRefs()) { if (mergedRef->mClass->isActor()) @@ -434,20 +438,24 @@ void Cell::initializeLocalActors() initializeLocalActor(ptr); } } + + LOG_APPEND(Log::LOG_VERBOSE, "- Successfully initialized LocalActors in %s", getDescription().c_str()); } void Cell::initializeDedicatedActor(const MWWorld::Ptr& ptr) { + std::string mapIndex = Main::get().getCellController()->generateMapIndex(ptr); + LOG_APPEND(Log::LOG_VERBOSE, "- Initializing DedicatedActor %s in %s", mapIndex.c_str(), getDescription().c_str()); + DedicatedActor *actor = new DedicatedActor(); actor->cell = *store->getCell(); actor->setPtr(ptr); - std::string mapIndex = Main::get().getCellController()->generateMapIndex(ptr); dedicatedActors[mapIndex] = actor; Main::get().getCellController()->setDedicatedActorRecord(mapIndex, getDescription()); - LOG_APPEND(Log::LOG_VERBOSE, "- Initialized DedicatedActor %s in %s", mapIndex.c_str(), getDescription().c_str()); + LOG_APPEND(Log::LOG_VERBOSE, "- Successfully initialized DedicatedActor %s in %s", mapIndex.c_str(), getDescription().c_str()); } void Cell::initializeDedicatedActors(ActorList& actorList) diff --git a/apps/openmw/mwmp/CellController.cpp b/apps/openmw/mwmp/CellController.cpp index b94d02cbe..e2d07b084 100644 --- a/apps/openmw/mwmp/CellController.cpp +++ b/apps/openmw/mwmp/CellController.cpp @@ -77,6 +77,8 @@ void CellController::initializeCell(const ESM::Cell& cell) // If this key doesn't exist, create it if (cellsInitialized.count(mapIndex) == 0) { + LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Initializing mwmp::Cell %s", cell.getDescription().c_str()); + MWWorld::CellStore *cellStore = getCellStore(cell); if (!cellStore) return; @@ -84,7 +86,7 @@ void CellController::initializeCell(const ESM::Cell& cell) mwmp::Cell *mpCell = new mwmp::Cell(cellStore); cellsInitialized[mapIndex] = mpCell; - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "- Initialized mwmp::Cell %s", mpCell->getDescription().c_str()); + LOG_APPEND(Log::LOG_VERBOSE, "- Successfully initialized mwmp::Cell %s", cell.getDescription().c_str()); } }