[Client] Add uninitializeCell() method to CellController

pull/593/head
David Cernat 4 years ago
parent c87a383bee
commit 9a83108fe5

@ -103,6 +103,21 @@ void CellController::initializeCell(const ESM::Cell& cell)
}
}
void CellController::uninitializeCell(const ESM::Cell& cell)
{
std::string mapIndex = cell.getDescription();
// If this key doesn't exist, create it
if (cellsInitialized.count(mapIndex) > 0)
{
mwmp::Cell* mpCell = cellsInitialized.at(mapIndex);
mpCell->uninitializeLocalActors();
mpCell->uninitializeDedicatedActors();
delete cellsInitialized.at(mapIndex);
cellsInitialized.erase(mapIndex);
}
}
void CellController::readPositions(ActorList& actorList)
{
std::string mapIndex = actorList.cell.getDescription();

@ -20,6 +20,7 @@ namespace mwmp
void updateDedicated(float dt);
void initializeCell(const ESM::Cell& cell);
void uninitializeCell(const ESM::Cell& cell);
void readPositions(mwmp::ActorList& actorList);
void readAnimFlags(mwmp::ActorList& actorList);

Loading…
Cancel
Save