Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Source/Entities/DynamicSong.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ SoundContainer& DynamicSongSection::SelectTransitionSoundContainer() {
}

SoundContainer& DynamicSongSection::SelectSoundContainer() {
RTEAssert(!m_SoundContainers.empty(), "Tried to get a SoundContainer from a DynamicSongSection with none to choose from!");

// Shuffle between our options if we have multiple
if (m_SoundContainers.size() > 1) {
if (m_ShuffleUnplayedIndices.empty()) {
Expand Down Expand Up @@ -199,8 +201,7 @@ SoundContainer& DynamicSongSection::SelectSoundContainer() {
}
}
}

RTEAssert(!m_SoundContainers.empty(), "Tried to get a SoundContainer from a DynamicSongSection with none to choose from!");

return m_SoundContainers[0];
}

Expand Down
1 change: 1 addition & 0 deletions Source/Managers/MusicMan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ void MusicMan::ResetMusicState() {

bool MusicMan::PlayDynamicSong(const std::string& songName, const std::string& songSectionType, bool playImmediately, bool playTransition, bool smoothFade) {
if (const DynamicSong* dynamicSongToPlay = dynamic_cast<const DynamicSong*>(g_PresetMan.GetEntityPreset("DynamicSong", songName))) {
m_NextSongSection = nullptr;
m_CurrentSong = std::unique_ptr<DynamicSong>(dynamic_cast<DynamicSong*>(dynamicSongToPlay->Clone()));
SetNextSongSectionType(songSectionType);
SelectNextSongSection();
Expand Down
Loading