mirror of
https://github.com/Relintai/props.git
synced 2024-11-12 10:15:25 +01:00
Make sure to duplicate the materials before adding them to the cache in _setup_cache.
This commit is contained in:
parent
1f45f626d3
commit
9c970bbed5
@ -245,7 +245,9 @@ void TiledWallData::_setup_cache(Ref<PropMaterialCache> cache) {
|
||||
const Ref<Material> &m = _materials[i];
|
||||
|
||||
if (m.is_valid()) {
|
||||
cache->material_add(m);
|
||||
Ref<Material> nm = m->duplicate();
|
||||
|
||||
cache->material_add(nm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user