mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
preloader compatible with esm4 exteriors.
This commit is contained in:
parent
75561abfca
commit
f731c5eadb
@ -1102,7 +1102,7 @@ namespace MWWorld
|
||||
|
||||
mLastPlayerPos = playerPos;
|
||||
|
||||
if (mPreloadEnabled && !ESM::isEsm4Ext(mCurrentCell->getCell()->getWorldSpace()))
|
||||
if (mPreloadEnabled)
|
||||
{
|
||||
if (mPreloadDoors)
|
||||
preloadTeleportDoorDestinations(playerPos, predictedPos, exteriorPositions);
|
||||
@ -1277,7 +1277,7 @@ namespace MWWorld
|
||||
{
|
||||
const MWWorld::ConstPtr player = mWorld.getPlayerPtr();
|
||||
ListFastTravelDestinationsVisitor listVisitor(mPreloadDistance, player.getRefData().getPosition().asVec3());
|
||||
|
||||
ESM::RefId extWorldspace = mWorld.getCurrentWorldspace();
|
||||
for (MWWorld::CellStore* cellStore : mActiveCells)
|
||||
{
|
||||
cellStore->forEachType<ESM::NPC>(listVisitor);
|
||||
@ -1293,7 +1293,7 @@ namespace MWWorld
|
||||
osg::Vec3f pos = dest.mPos.asVec3();
|
||||
const osg::Vec2i cellIndex = positionToCellIndex(pos.x(), pos.y());
|
||||
preloadCell(mWorld.getWorldModel().getExterior(
|
||||
ESM::ExteriorCellIndex(cellIndex.x(), cellIndex.y(), ESM::Cell::sDefaultWorldspaceId)),
|
||||
ESM::ExteriorCellIndex(cellIndex.x(), cellIndex.y(), extWorldspace)),
|
||||
true);
|
||||
exteriorPositions.emplace_back(pos, gridCenterToBounds(getNewGridCenter(pos)));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user