Support animated textures in non-static objects too

This commit is contained in:
Marianne Gagnon 2014-06-23 20:02:31 -04:00
parent d4bbb50e0a
commit 1be98dc5db
2 changed files with 6 additions and 1 deletions

View File

@ -33,6 +33,8 @@ AnimationBase::AnimationBase(const XMLNode &node)
node.get("fps", &fps);
for(unsigned int i=0; i<node.getNumNodes(); i++)
{
if (node.getNode(i)->getName() == "animated-texture")
continue;
Ipo *ipo = new Ipo(*node.getNode(i), fps);
m_all_ipos.push_back(ipo);
}

View File

@ -254,7 +254,7 @@ TrackObjectPresentationMesh::TrackObjectPresentationMesh(const XMLNode& xml_node
else
{
m_mesh = irr_driver->getMesh(model_name);
if (tangent)
{
scene::IMeshManipulator* manip = irr_driver->getVideoDriver()->getMeshManipulator();
@ -368,6 +368,9 @@ void TrackObjectPresentationMesh::init(const XMLNode* xml_node, scene::ISceneNod
m_node = irr_driver->addMesh(m_mesh, parent);
m_frame_start = 0;
m_frame_end = 0;
if (World::getWorld() != NULL && World::getWorld()->getTrack() != NULL)
World::getWorld()->getTrack()->handleAnimatedTextures(m_node, *xml_node);
}
//#ifdef DEBUG
// std::string debug_name = model_name+" (track-object)";