forked from teamnwah/openmw-tes3coop
[Client] Fix invalid read (memcheck warning)
This commit is contained in:
parent
2bc79fcdf4
commit
cd03d59056
3 changed files with 12 additions and 12 deletions
|
@ -1333,7 +1333,7 @@ void LocalPlayer::clearCurrentContainer()
|
|||
currentContainer.mpNum = 0;
|
||||
}
|
||||
|
||||
void LocalPlayer::storeCellState(ESM::Cell cell, int stateType)
|
||||
void LocalPlayer::storeCellState(const ESM::Cell& cell, int stateType)
|
||||
{
|
||||
std::vector<CellState>::iterator iter;
|
||||
|
||||
|
|
|
@ -84,8 +84,8 @@ namespace mwmp
|
|||
void clearCellStates();
|
||||
void clearCurrentContainer();
|
||||
|
||||
void storeCellState(ESM::Cell cell, int stateType);
|
||||
void storeCurrentContainer(const MWWorld::Ptr& container);
|
||||
void storeCellState(const ESM::Cell& cell, int stateType);
|
||||
|
||||
private:
|
||||
Networking *getNetworking();
|
||||
|
|
|
@ -261,16 +261,6 @@ namespace MWWorld
|
|||
mPhysics->removeHeightField ((*iter)->getCell()->getGridX(), (*iter)->getCell()->getGridY());
|
||||
}
|
||||
|
||||
MWBase::Environment::get().getMechanicsManager()->drop (*iter);
|
||||
|
||||
mRendering.removeCell(*iter);
|
||||
MWBase::Environment::get().getWindowManager()->removeCell(*iter);
|
||||
|
||||
MWBase::Environment::get().getWorld()->getLocalScripts().clearCell (*iter);
|
||||
|
||||
MWBase::Environment::get().getSoundManager()->stopSound (*iter);
|
||||
mActiveCells.erase(*iter);
|
||||
|
||||
/*
|
||||
Start of tes3mp addition
|
||||
|
||||
|
@ -280,6 +270,16 @@ namespace MWWorld
|
|||
/*
|
||||
End of tes3mp addition
|
||||
*/
|
||||
|
||||
MWBase::Environment::get().getMechanicsManager()->drop (*iter);
|
||||
|
||||
mRendering.removeCell(*iter);
|
||||
MWBase::Environment::get().getWindowManager()->removeCell(*iter);
|
||||
|
||||
MWBase::Environment::get().getWorld()->getLocalScripts().clearCell (*iter);
|
||||
|
||||
MWBase::Environment::get().getSoundManager()->stopSound (*iter);
|
||||
mActiveCells.erase(*iter);
|
||||
}
|
||||
|
||||
void Scene::loadCell (CellStore *cell, Loading::Listener* loadingListener, bool respawn)
|
||||
|
|
Loading…
Reference in a new issue