Game Development Community

ITickable bug

by Tom Spilman · in Torque Game Engine Advanced · 09/10/2007 (1:01 pm) · 1 replies

This may be fixed in the latest TGEA/TGE, but i haven't checked... still people might want to look.

ITickable doesn't initialize the mProcessTick var which would be set true in debug builds (because of the 0xCDCDCDCD default values) and in release you would randomly get whatever garbage was in the memory location. The fix is to initialize the var to something in the ITickable constructor:

ITickable::ITickable() : mProcessTick( true ) // ADDED!
{
   VECTOR_SET_ASSOCIATION( smProcessList );
   smProcessList.push_back( this );
}

About the author

Tom is a programmer and co-owner of Sickhead Games, LLC.