void CTerrainSceneNode::smoothTerrain(CDynamicMeshBuffer* mb, s32 smoothFactor)
mb->getVertexBuffer()[x + yd].Pos.Y =
(mb->getVertexBuffer()[x-1 + yd].Pos.Y +// ==> left
mb->getVertexBuffer()[x+1 + yd].Pos.Y +// ==> right
mb->getVertexBuffer()[x + yd - TerrainData.Size].Pos.Y +// ==> top
mb->getVertexBuffer()[x + yd - TerrainData.Size].Pos.Y)// ==> bottom ???
* 0.25f;
I change to
mb->getVertexBuffer()[x + yd + TerrainData.Size].Pos.Y); // The picture seems to be correct.
but I do not known what is right.