Fix #1679
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user