Also append sounds when appending a map to another map

This commit is contained in:
Robert Müller 2022-11-03 20:21:45 +01:00
parent b0a21dab09
commit c5bbccfe07

View file

@ -1030,6 +1030,9 @@ bool CEditor::Append(const char *pFileName, int StorageType)
gs_ModifyAddAmount = m_Map.m_vpImages.size();
NewMap.ModifyImageIndex(ModifyAdd);
gs_ModifyAddAmount = m_Map.m_vpSounds.size();
NewMap.ModifySoundIndex(ModifyAdd);
gs_ModifyAddAmount = m_Map.m_vpEnvelopes.size();
NewMap.ModifyEnvelopeIndex(ModifyAdd);
@ -1038,6 +1041,11 @@ bool CEditor::Append(const char *pFileName, int StorageType)
m_Map.m_vpImages.push_back(pImage);
NewMap.m_vpImages.clear();
// transfer sounds
for(const auto &pSound : NewMap.m_vpSounds)
m_Map.m_vpSounds.push_back(pSound);
NewMap.m_vpSounds.clear();
// transfer envelopes
for(const auto &pEnvelope : NewMap.m_vpEnvelopes)
m_Map.m_vpEnvelopes.push_back(pEnvelope);