mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 06:28:19 +00:00
Also append sounds when appending a map to another map
This commit is contained in:
parent
b0a21dab09
commit
c5bbccfe07
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue