mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +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();
|
gs_ModifyAddAmount = m_Map.m_vpImages.size();
|
||||||
NewMap.ModifyImageIndex(ModifyAdd);
|
NewMap.ModifyImageIndex(ModifyAdd);
|
||||||
|
|
||||||
|
gs_ModifyAddAmount = m_Map.m_vpSounds.size();
|
||||||
|
NewMap.ModifySoundIndex(ModifyAdd);
|
||||||
|
|
||||||
gs_ModifyAddAmount = m_Map.m_vpEnvelopes.size();
|
gs_ModifyAddAmount = m_Map.m_vpEnvelopes.size();
|
||||||
NewMap.ModifyEnvelopeIndex(ModifyAdd);
|
NewMap.ModifyEnvelopeIndex(ModifyAdd);
|
||||||
|
|
||||||
|
@ -1038,6 +1041,11 @@ bool CEditor::Append(const char *pFileName, int StorageType)
|
||||||
m_Map.m_vpImages.push_back(pImage);
|
m_Map.m_vpImages.push_back(pImage);
|
||||||
NewMap.m_vpImages.clear();
|
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
|
// transfer envelopes
|
||||||
for(const auto &pEnvelope : NewMap.m_vpEnvelopes)
|
for(const auto &pEnvelope : NewMap.m_vpEnvelopes)
|
||||||
m_Map.m_vpEnvelopes.push_back(pEnvelope);
|
m_Map.m_vpEnvelopes.push_back(pEnvelope);
|
||||||
|
|
Loading…
Reference in a new issue