This commit is contained in:
Benau
2017-01-10 14:12:38 +08:00
parent aa01fafe92
commit f1b0f529be
2 changed files with 4 additions and 4 deletions

View File

@@ -175,9 +175,7 @@ video::ITexture* STKTexManager::getUnicolorTexture(const irr::video::SColor &c)
memcpy(data + 4, &c.color, sizeof(video::SColor));
memcpy(data + 8, &c.color, sizeof(video::SColor));
memcpy(data + 12, &c.color, sizeof(video::SColor));
STKTexture* texture = new STKTexture(data, name, 2);
addTexture(texture);
return texture;
return addTexture(new STKTexture(data, name, 2));
} // getUnicolorTexture

View File

@@ -135,7 +135,9 @@ void STKTexture::reload(bool no_upload, uint8_t* preload_data,
cache_subdir + container_id;
compressed_texture = cache_dir + "/" + basename + ".stktz";
if (loadCompressedTexture(compressed_texture))
if ((!file_manager->fileExists(compressed_texture) ||
file_manager->fileIsNewer(compressed_texture, orig_file)) &&
loadCompressedTexture(compressed_texture))
{
Log::debug("STKTexture", "Compressed %s for texture %s",
compressed_texture.c_str(), orig_file.c_str());