mirror of
https://github.com/Relintai/terraman.git
synced 2025-04-23 21:43:23 +02:00
Don't forget to add props (prop textures) to the cache.
This commit is contained in:
parent
114adce2b9
commit
b36d91fd76
@ -289,6 +289,16 @@ void TerramanLibraryMergerPCM::_prop_material_cache_get_key(Ref<TerraChunk> chun
|
|||||||
cache->material_add(nm);
|
cache->material_add(nm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PROPS_PRESENT
|
||||||
|
for (int i = 0; i < chunk->prop_get_count(); ++i) {
|
||||||
|
Ref<PropData> prop = chunk->prop_get(i);
|
||||||
|
|
||||||
|
ERR_CONTINUE(!prop.is_valid());
|
||||||
|
|
||||||
|
cache->prop_add_textures(prop);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
_prop_material_cache[hash] = cache;
|
_prop_material_cache[hash] = cache;
|
||||||
|
|
||||||
//unlock here, so if a different thread need the cache it will be able to immediately access the materials and surfaces when it gets it.
|
//unlock here, so if a different thread need the cache it will be able to immediately access the materials and surfaces when it gets it.
|
||||||
|
Loading…
Reference in New Issue
Block a user