1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 04:09:42 +00:00

Fixes Quad tree terrain missing in some places

the function that queried if data existed or not didn't take the worlspace into account.
This commit is contained in:
florent.teppe 2023-05-24 00:00:40 +02:00
parent b29be74491
commit 4c4ed77bd7

View file

@ -30,8 +30,14 @@ namespace MWRender
{
const MWWorld::ESMStore& esmStore = *MWBase::Environment::get().getESMStore();
const ESM::Land* land = esmStore.get<ESM::Land>().search(cellLocation.mX, cellLocation.mY);
return land != nullptr;
if (ESM::isEsm4Ext(cellLocation.mWorldspace))
{
return esmStore.get<ESM4::Land>().search(cellLocation) != nullptr;
}
else
{
return esmStore.get<ESM::Land>().search(cellLocation.mX, cellLocation.mY) != nullptr;
}
}
static void BoundUnion(float& minX, float& maxX, float& minY, float& maxY, float x, float y)