diff options
| author | MirceaKitsune <sonichedgehog_hyperblast00@yahoo.com> | 2012-10-24 22:10:05 +0300 |
|---|---|---|
| committer | Perttu Ahola <celeron55@gmail.com> | 2012-11-25 18:14:15 +0200 |
| commit | 9c8ba427503cbf73f0263495a791656b905c2efc (patch) | |
| tree | 098f163a19b5cedd11e040e68bfc5b920e21c51b /src/content_cao.cpp | |
| parent | f9675bd2b4d48b9517cd4939a5cfe1ea9c775b6c (diff) | |
| download | dragonfireclient-9c8ba427503cbf73f0263495a791656b905c2efc.tar.xz | |
Get the mesh working through the memory cache properly. Most credit goes to celeron55 for the help on this code
Get the texture from memory as well
Add .x to the list of supported formats
Update LUA API documentation
Diffstat (limited to 'src/content_cao.cpp')
| -rw-r--r-- | src/content_cao.cpp | 13 |
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; |
