mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-15 06:36:44 +00:00
no default terrain for esm4 exterior.
This commit is contained in:
parent
2bb17279df
commit
7d88a240d3
2 changed files with 11 additions and 2 deletions
|
@ -406,7 +406,7 @@ namespace MWWorld
|
||||||
mPhysics->addHeightField(data->getHeights().data(), cellX, cellY, worldsize, verts,
|
mPhysics->addHeightField(data->getHeights().data(), cellX, cellY, worldsize, verts,
|
||||||
data->getMinHeight(), data->getMaxHeight(), land.get());
|
data->getMinHeight(), data->getMaxHeight(), land.get());
|
||||||
}
|
}
|
||||||
else
|
else if (!ESM::isEsm4Ext(worldspace))
|
||||||
{
|
{
|
||||||
static std::vector<float> defaultHeight;
|
static std::vector<float> defaultHeight;
|
||||||
defaultHeight.resize(verts * verts, ESM::Land::DEFAULT_HEIGHT);
|
defaultHeight.resize(verts * verts, ESM::Land::DEFAULT_HEIGHT);
|
||||||
|
|
|
@ -218,7 +218,7 @@ namespace ESMTerrain
|
||||||
LandCache cache;
|
LandCache cache;
|
||||||
|
|
||||||
bool alteration = useAlteration();
|
bool alteration = useAlteration();
|
||||||
|
bool validHeightDataExists = false;
|
||||||
float vertY_ = 0; // of current cell corner
|
float vertY_ = 0; // of current cell corner
|
||||||
for (int cellY = startCellY; cellY < startCellY + std::ceil(size); ++cellY)
|
for (int cellY = startCellY; cellY < startCellY + std::ceil(size); ++cellY)
|
||||||
{
|
{
|
||||||
|
@ -235,6 +235,7 @@ namespace ESMTerrain
|
||||||
heightData = land->getData(ESM::Land::DATA_VHGT);
|
heightData = land->getData(ESM::Land::DATA_VHGT);
|
||||||
normalData = land->getData(ESM::Land::DATA_VNML);
|
normalData = land->getData(ESM::Land::DATA_VNML);
|
||||||
colourData = land->getData(ESM::Land::DATA_VCLR);
|
colourData = land->getData(ESM::Land::DATA_VCLR);
|
||||||
|
validHeightDataExists = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int rowStart = 0;
|
int rowStart = 0;
|
||||||
|
@ -333,6 +334,14 @@ namespace ESMTerrain
|
||||||
assert(vertX_ == numVerts); // Ensure we covered whole area
|
assert(vertX_ == numVerts); // Ensure we covered whole area
|
||||||
}
|
}
|
||||||
assert(vertY_ == numVerts); // Ensure we covered whole area
|
assert(vertY_ == numVerts); // Ensure we covered whole area
|
||||||
|
|
||||||
|
if (!validHeightDataExists && ESM::isEsm4Ext(worldspace))
|
||||||
|
{
|
||||||
|
for (int iVert = 0; iVert < numVerts * numVerts; iVert++)
|
||||||
|
{
|
||||||
|
(*positions)[static_cast<unsigned int>(iVert)] = osg::Vec3f(0.f, 0.f, 0.f);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Storage::UniqueTextureId Storage::getVtexIndexAt(
|
Storage::UniqueTextureId Storage::getVtexIndexAt(
|
||||||
|
|
Loading…
Reference in a new issue