Suspicious code in t2dStaticSprite()....
by Tom Spilman · in Torque Game Builder · 06/27/2006 (4:49 pm) · 2 replies
Noticed something strange in the constructor for t2dStaticSprite...
This is resetting the frame to zero on the global config datablock when any static sprite is created. Not sure if this is intended to work this way or not... but it seems like the wrong way to setup the default setting.
t2dStaticSprite::t2dStaticSprite() : T2D_Stream_HeaderID(makeFourCCTag('2','D','S','S')),
mImageMapDataBlock(NULL),
mImageMapDataBlockName(NULL),
mFrame(0)
{
if (getDefaultConfig())
getDefaultConfig()->setDataField(StringTable->insert("frame"), NULL, "0");
}This is resetting the frame to zero on the global config datablock when any static sprite is created. Not sure if this is intended to work this way or not... but it seems like the wrong way to setup the default setting.
About the author
Tom is a programmer and co-owner of Sickhead Games, LLC.
#2
This has been fixed and will be in the 1.1.1 release, thanks again for spotting it and reporting!
Cheers,
-Justin
07/13/2006 (2:21 pm)
Tom,This has been fixed and will be in the 1.1.1 release, thanks again for spotting it and reporting!
Cheers,
-Justin
Torque 3D Owner Matthew Langley
Torque