mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-25 03:40:40 +00:00
enable terrain takes a worldspace as input
enable terrain anslo switches the worldspace.
This commit is contained in:
parent
1b718f09c5
commit
e09cf6ac61
@ -762,10 +762,12 @@ namespace MWRender
|
|||||||
mWater->removeCell(store);
|
mWater->removeCell(store);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderingManager::enableTerrain(bool enable)
|
void RenderingManager::enableTerrain(bool enable, ESM::RefId worldspace)
|
||||||
{
|
{
|
||||||
if (!enable)
|
if (!enable)
|
||||||
mWater->setCullCallback(nullptr);
|
mWater->setCullCallback(nullptr);
|
||||||
|
else
|
||||||
|
mTerrain = getWorldspaceTerrain(worldspace);
|
||||||
mTerrain->enable(enable);
|
mTerrain->enable(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ namespace MWRender
|
|||||||
void addCell(const MWWorld::CellStore* store);
|
void addCell(const MWWorld::CellStore* store);
|
||||||
void removeCell(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);
|
void updatePtr(const MWWorld::Ptr& old, const MWWorld::Ptr& updated);
|
||||||
|
|
||||||
|
@ -784,7 +784,7 @@ namespace MWWorld
|
|||||||
mHalfGridSize = cell.getCell()->isEsm4() ? Constants::ESM4CellGridRadius : Constants::CellGridRadius;
|
mHalfGridSize = cell.getCell()->isEsm4() ? Constants::ESM4CellGridRadius : Constants::CellGridRadius;
|
||||||
mCurrentCell = &cell;
|
mCurrentCell = &cell;
|
||||||
|
|
||||||
mRendering.enableTerrain(cell.isExterior());
|
mRendering.enableTerrain(cell.isExterior(), cell.getCell()->getWorldSpace());
|
||||||
|
|
||||||
MWWorld::Ptr old = mWorld.getPlayerPtr();
|
MWWorld::Ptr old = mWorld.getPlayerPtr();
|
||||||
mWorld.getPlayer().setCell(&cell);
|
mWorld.getPlayer().setCell(&cell);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user