[fixed]smoothTerrain

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
loverlinfish
Posts: 7
Joined: Thu Aug 06, 2009 8:38 am

[fixed]smoothTerrain

Post by loverlinfish »

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.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, you're right. That's a sign bug. Fixed for version 1.5.2
Post Reply