Game Development Community

Suspicious initialization code in atlasGen.cpp

by Pete Patterson · in Torque Game Engine Advanced · 02/26/2007 (11:59 am) · 0 replies

In atlasgen.cpp between lines 618 and 626

AtlasGenState(S8 activationLevel)
{
ptr = 0;
previous_level = 0;
activation_level = activationLevel;

for (S32 i = 0; i < 2; i++)
mBuffer[i>>1].set(S32_MIN, S32_MAX);
}


It makes no sense to me why the mBuffer index is shifted right one. mBuffer[0] is being set twice, and mBuffer[1] is never set.

Hope this is helpful to someone, although 'fixing' it doesn't seem to improve Atlas terrain generation.