I found this little gem in an essential - but probably little-used to date - function. Take a look at the if condition:
Code:
DLLEXP bool setNodeTransformMatrix( NodeHandle node, const float *mat4x4 )
{
SceneNode *sn = Modules::sceneMan().resolveNodeHandle( node );
if( sn != 0x0 || mat4x4 == 0x0 )
{
static Matrix4f mat;
memcpy( mat.c, mat4x4, 16 * sizeof( float ) );
sn->setTransform( mat );
return true;
}
else
{
Modules::log().writeDebugInfo( "Invalid node handle %i in setNodeTransformMatrix", node );
return false;
}
}
I am pretty sure it should be like this instead:
Code:
if( sn != 0x0 && mat4x4 != 0x0 )
{
static Matrix4f mat;
memcpy( mat.c, mat4x4, 16 * sizeof( float ) );
sn->setTransform( mat );
return true;
}
else
{
//...
}
}