mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 15:41:13 -04:00
[Client] Use clearer debug for actor initializations
This commit is contained in:
parent
2e1d4a9449
commit
43f195f0c7
@ -399,6 +399,9 @@ void Cell::readCellChange(ActorList& actorList)
|
|||||||
|
|
||||||
void Cell::initializeLocalActor(const MWWorld::Ptr& ptr)
|
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();
|
LocalActor *actor = new LocalActor();
|
||||||
actor->cell = *store->getCell();
|
actor->cell = *store->getCell();
|
||||||
actor->setPtr(ptr);
|
actor->setPtr(ptr);
|
||||||
@ -408,16 +411,17 @@ void Cell::initializeLocalActor(const MWWorld::Ptr& ptr)
|
|||||||
if (ptr.getClass().getCreatureStats(ptr).isDead())
|
if (ptr.getClass().getCreatureStats(ptr).isDead())
|
||||||
actor->wasDead = true;
|
actor->wasDead = true;
|
||||||
|
|
||||||
std::string mapIndex = Main::get().getCellController()->generateMapIndex(ptr);
|
|
||||||
localActors[mapIndex] = actor;
|
localActors[mapIndex] = actor;
|
||||||
|
|
||||||
Main::get().getCellController()->setLocalActorRecord(mapIndex, getDescription());
|
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()
|
void Cell::initializeLocalActors()
|
||||||
{
|
{
|
||||||
|
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Initializing LocalActors in %s", getDescription().c_str());
|
||||||
|
|
||||||
for (const auto &mergedRef : store->getMergedRefs())
|
for (const auto &mergedRef : store->getMergedRefs())
|
||||||
{
|
{
|
||||||
if (mergedRef->mClass->isActor())
|
if (mergedRef->mClass->isActor())
|
||||||
@ -434,20 +438,24 @@ void Cell::initializeLocalActors()
|
|||||||
initializeLocalActor(ptr);
|
initializeLocalActor(ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG_APPEND(Log::LOG_VERBOSE, "- Successfully initialized LocalActors in %s", getDescription().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Cell::initializeDedicatedActor(const MWWorld::Ptr& ptr)
|
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();
|
DedicatedActor *actor = new DedicatedActor();
|
||||||
actor->cell = *store->getCell();
|
actor->cell = *store->getCell();
|
||||||
actor->setPtr(ptr);
|
actor->setPtr(ptr);
|
||||||
|
|
||||||
std::string mapIndex = Main::get().getCellController()->generateMapIndex(ptr);
|
|
||||||
dedicatedActors[mapIndex] = actor;
|
dedicatedActors[mapIndex] = actor;
|
||||||
|
|
||||||
Main::get().getCellController()->setDedicatedActorRecord(mapIndex, getDescription());
|
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)
|
void Cell::initializeDedicatedActors(ActorList& actorList)
|
||||||
|
@ -77,6 +77,8 @@ void CellController::initializeCell(const ESM::Cell& cell)
|
|||||||
// If this key doesn't exist, create it
|
// If this key doesn't exist, create it
|
||||||
if (cellsInitialized.count(mapIndex) == 0)
|
if (cellsInitialized.count(mapIndex) == 0)
|
||||||
{
|
{
|
||||||
|
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Initializing mwmp::Cell %s", cell.getDescription().c_str());
|
||||||
|
|
||||||
MWWorld::CellStore *cellStore = getCellStore(cell);
|
MWWorld::CellStore *cellStore = getCellStore(cell);
|
||||||
|
|
||||||
if (!cellStore) return;
|
if (!cellStore) return;
|
||||||
@ -84,7 +86,7 @@ void CellController::initializeCell(const ESM::Cell& cell)
|
|||||||
mwmp::Cell *mpCell = new mwmp::Cell(cellStore);
|
mwmp::Cell *mpCell = new mwmp::Cell(cellStore);
|
||||||
cellsInitialized[mapIndex] = mpCell;
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user