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
This commit is contained in:
committed by
Perttu Ahola
parent
f9675bd2b4
commit
9c8ba42750
@@ -979,6 +979,8 @@ class GenericCAO : public ClientActiveObject
|
||||
|
||||
updateTexturePos();
|
||||
|
||||
updateAnimations();
|
||||
|
||||
if(m_reset_textures_timer >= 0){
|
||||
m_reset_textures_timer -= dtime;
|
||||
if(m_reset_textures_timer <= 0){
|
||||
@@ -1066,8 +1068,7 @@ class GenericCAO : public ClientActiveObject
|
||||
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 @@ class GenericCAO : public ClientActiveObject
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user