1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

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:
MirceaKitsune 2012-10-24 22:10:05 +03:00 committed by Perttu Ahola
parent f9675bd2b4
commit 9c8ba42750
4 changed files with 28 additions and 14 deletions

View file

@ -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;