mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 11:09:43 +00:00
enable terrain takes a worldspace as input
enable terrain anslo switches the worldspace.
This commit is contained in:
parent
1b718f09c5
commit
e09cf6ac61
3 changed files with 5 additions and 3 deletions
|
@ -762,10 +762,12 @@ namespace MWRender
|
|||
mWater->removeCell(store);
|
||||
}
|
||||
|
||||
void RenderingManager::enableTerrain(bool enable)
|
||||
void RenderingManager::enableTerrain(bool enable, ESM::RefId worldspace)
|
||||
{
|
||||
if (!enable)
|
||||
mWater->setCullCallback(nullptr);
|
||||
else
|
||||
mTerrain = getWorldspaceTerrain(worldspace);
|
||||
mTerrain->enable(enable);
|
||||
}
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ namespace MWRender
|
|||
void addCell(const MWWorld::CellStore* store);
|
||||
void removeCell(const MWWorld::CellStore* store);
|
||||
|
||||
void enableTerrain(bool enable);
|
||||
void enableTerrain(bool enable, ESM::RefId worldspace);
|
||||
|
||||
void updatePtr(const MWWorld::Ptr& old, const MWWorld::Ptr& updated);
|
||||
|
||||
|
|
|
@ -784,7 +784,7 @@ namespace MWWorld
|
|||
mHalfGridSize = cell.getCell()->isEsm4() ? Constants::ESM4CellGridRadius : Constants::CellGridRadius;
|
||||
mCurrentCell = &cell;
|
||||
|
||||
mRendering.enableTerrain(cell.isExterior());
|
||||
mRendering.enableTerrain(cell.isExterior(), cell.getCell()->getWorldSpace());
|
||||
|
||||
MWWorld::Ptr old = mWorld.getPlayerPtr();
|
||||
mWorld.getPlayer().setCell(&cell);
|
||||
|
|
Loading…
Reference in a new issue