How to stop Terrain Blocks from repeating
by Ken Finney · in Torque Game Engine · 02/03/2002 (9:50 pm) · 21 replies
Has been a hot topic in the past. Well, it's not so hard :)

What to do:
in terrRender.cc at the start of the method TerrainRender::emitTerrChunk (around line 411 or so)
add a check to see if this is the primary block or not:
void TerrainRender::emitTerrChunk(SquareStackNode *n, F32 squareDistance, U32 lightMask, bool farClip, bool drawDetails)
{
// KCF ******** add next two lines to stop terrain tile repeating
if(mBlockPos.x || mBlockPos.y)
return;
primary block's position is 0,0 so x & y both = 0.
note that there is a similar test already in there, but commented out - however that test is looking at the wrong object.

What to do:
in terrRender.cc at the start of the method TerrainRender::emitTerrChunk (around line 411 or so)
add a check to see if this is the primary block or not:
void TerrainRender::emitTerrChunk(SquareStackNode *n, F32 squareDistance, U32 lightMask, bool farClip, bool drawDetails)
{
// KCF ******** add next two lines to stop terrain tile repeating
if(mBlockPos.x || mBlockPos.y)
return;
primary block's position is 0,0 so x & y both = 0.
note that there is a similar test already in there, but commented out - however that test is looking at the wrong object.
About the author
Torque Owner Stefan Walker