mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Clear mesh callbacks on clone
This commit is contained in:
parent
098e2a6894
commit
952a407f3e
@ -25,6 +25,9 @@ HRESULT Direct3DRMMeshImpl::Clone(int flags, GUID iid, void** object)
|
|||||||
|
|
||||||
auto* clone = new Direct3DRMMeshImpl(*this);
|
auto* clone = new Direct3DRMMeshImpl(*this);
|
||||||
|
|
||||||
|
// We should not call the other meshes callbacks
|
||||||
|
clone->m_callbacks.clear();
|
||||||
|
|
||||||
for (auto& group : clone->m_groups) {
|
for (auto& group : clone->m_groups) {
|
||||||
// Reusing the same texture and material on the new mesh instead of cloning them might not be correct
|
// Reusing the same texture and material on the new mesh instead of cloning them might not be correct
|
||||||
if (group.texture) {
|
if (group.texture) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user