mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
CLEANUP(CS): Do heightData check in actual implementation, revert
accidental change to land condition order
This commit is contained in:
parent
86316fa7ab
commit
145f9c1154
@ -120,7 +120,7 @@ bool CSVRender::Cell::addObjects(int start, int end)
|
|||||||
|
|
||||||
void CSVRender::Cell::updateLand()
|
void CSVRender::Cell::updateLand()
|
||||||
{
|
{
|
||||||
if (mLandDeleted || !mUpdateLand)
|
if (!mUpdateLand || mLandDeleted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mUpdateLand = false;
|
mUpdateLand = false;
|
||||||
|
@ -154,6 +154,8 @@ namespace CSVRender
|
|||||||
|
|
||||||
void TerrainStorage::adjustColor(int col, int row, const ESM::LandData* heightData, osg::Vec4ub& color) const
|
void TerrainStorage::adjustColor(int col, int row, const ESM::LandData* heightData, osg::Vec4ub& color) const
|
||||||
{
|
{
|
||||||
|
if (!heightData)
|
||||||
|
return;
|
||||||
// Highlight broken height changes
|
// Highlight broken height changes
|
||||||
int heightWarningLimit = 1024;
|
int heightWarningLimit = 1024;
|
||||||
if (((col > 0 && row > 0) && leftOrUpIsOverTheLimit(col, row, heightWarningLimit, heightData->getHeights()))
|
if (((col > 0 && row > 0) && leftOrUpIsOverTheLimit(col, row, heightWarningLimit, heightData->getHeights()))
|
||||||
|
@ -346,7 +346,7 @@ namespace ESMTerrain
|
|||||||
color[i] = colourData->getColors()[srcArrayIndex + i];
|
color[i] = colourData->getColors()[srcArrayIndex + i];
|
||||||
|
|
||||||
// Does nothing by default, override in OpenMW-CS
|
// Does nothing by default, override in OpenMW-CS
|
||||||
if (alteration && heightData != nullptr)
|
if (alteration)
|
||||||
adjustColor(col, row, heightData, color);
|
adjustColor(col, row, heightData, color);
|
||||||
|
|
||||||
// Unlike normals, colors mostly connect seamlessly between cells, but not always...
|
// Unlike normals, colors mostly connect seamlessly between cells, but not always...
|
||||||
|
Loading…
Reference in New Issue
Block a user