mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Make possible and do update textures in node definitions after late texture atlas making
This commit is contained in:
parent
c6fd2986d4
commit
1afed48a2c
4 changed files with 26 additions and 1 deletions
|
@ -164,6 +164,21 @@ public:
|
|||
assert(c <= MAX_CONTENT);
|
||||
return &m_content_features[c];
|
||||
}
|
||||
virtual void updateTextures(ITextureSource *tsrc)
|
||||
{
|
||||
#ifndef SERVER
|
||||
infostream<<"CNodeDefManager::updateTextures(): Updating "
|
||||
<<"textures in node definitions"<<std::endl;
|
||||
for(u16 i=0; i<=MAX_CONTENT; i++)
|
||||
{
|
||||
ContentFeatures *f = &m_content_features[i];
|
||||
for(u16 j=0; j<6; j++)
|
||||
tsrc->updateAP(f->tiles[j].texture);
|
||||
if(f->special_atlas)
|
||||
tsrc->updateAP(*(f->special_atlas));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
ContentFeatures m_content_features[MAX_CONTENT+1];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue