Fixed #38, fixed #1230 (which is a duplicate).

This commit is contained in:
hiker
2014-03-06 17:11:22 +11:00
parent 58a5928b17
commit 0208dbaf8a

View File

@@ -251,12 +251,14 @@ TrackObjectPresentationMesh::TrackObjectPresentationMesh(
void TrackObjectPresentationMesh::init(const XMLNode* xml_node, scene::ISceneNode* parent, bool enabled)
{
bool skeletal_animation = true; // for backwards compatibility, if unspecified assume there is
xml_node->get("skeletal-animation", &skeletal_animation);
if(xml_node)
xml_node->get("skeletal-animation", &skeletal_animation);
bool animated = skeletal_animation && (UserConfigParams::m_graphical_effects ||
World::getWorld()->getIdent() == IDENT_CUTSCENE);
bool displacing = false;
xml_node->get("displacing", &displacing);
if(xml_node)
xml_node->get("displacing", &displacing);
animated &= !displacing;
m_mesh->grab();
@@ -281,11 +283,11 @@ void TrackObjectPresentationMesh::init(const XMLNode* xml_node, scene::ISceneNod
m_node = node;
m_frame_start = node->getStartFrame();
if (xml_node != NULL)
if (xml_node)
xml_node->get("frame-start", &m_frame_start);
m_frame_end = node->getEndFrame();
if (xml_node != NULL)
if (xml_node)
xml_node->get("frame-end", &m_frame_end);
}
else