mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-03 15:45:32 +00:00
[Client] Add uninitializeCell() method to CellController
This commit is contained in:
parent
c87a383bee
commit
9a83108fe5
2 changed files with 16 additions and 0 deletions
|
@ -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…
Reference in a new issue