summaryrefslogtreecommitdiff
path: root/src/content_cao.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/content_cao.cpp')
-rw-r--r--src/content_cao.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/content_cao.cpp b/src/content_cao.cpp
index b3c0370b8..cd822cb33 100644
--- a/src/content_cao.cpp
+++ b/src/content_cao.cpp
@@ -979,6 +979,8 @@ public:
updateTexturePos();
+ updateAnimations();
+
if(m_reset_textures_timer >= 0){
m_reset_textures_timer -= dtime;
if(m_reset_textures_timer <= 0){
@@ -1066,8 +1068,7 @@ public:
if(texturestring == "")
continue; // Empty texture string means don't modify that material
texturestring += mod;
- video::IVideoDriver* driver = m_animated_meshnode->getSceneManager()->getVideoDriver();
- video::ITexture* texture = driver->getTexture(texturestring.c_str());
+ video::ITexture* texture = tsrc->getTextureRaw(texturestring);
if(!texture)
{
errorstream<<"GenericCAO::updateTextures(): Could not load texture "<<texturestring<<std::endl;
@@ -1135,6 +1136,14 @@ public:
}
}
+ void updateAnimations()
+ {
+ if(!m_animated_meshnode)
+ return;
+
+ m_animated_meshnode->setFrameLoop(0, 50);
+ }
+
void processMessage(const std::string &data)
{
//infostream<<"GenericCAO: Got message"<<std::endl;