mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-25 06:41:30 -04:00
Fix WSYS using take_all
whoops
This commit is contained in:
@@ -267,12 +267,16 @@ void sync_audio_replacements() {
|
||||
absl::flat_hash_map<AudioWaveKey, AudioWaveReplacementValue> new_map;
|
||||
|
||||
for (auto const& mod : ModLoader::instance().active_mods()) {
|
||||
for (auto const& slot : s_waveReplacements.take_all(mod)) {
|
||||
auto const wave_info = wave_info_from_slot(slot.value);
|
||||
s_waveReplacements.for_each([&](auto, auto entry) {
|
||||
if (entry.owner != &mod) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto const wave_info = wave_info_from_slot(entry.value);
|
||||
new_map.emplace(
|
||||
AudioWaveKey(slot.value.bank, slot.value.wave_id),
|
||||
AudioWaveReplacementValue(wave_info, slot.value.data));
|
||||
}
|
||||
AudioWaveKey(entry.value.bank, entry.value.wave_id),
|
||||
AudioWaveReplacementValue(wave_info, entry.value.data));
|
||||
});
|
||||
}
|
||||
|
||||
// Log.info("new: {}, old: {}", new_map.size(), s_replacements.size());
|
||||
|
||||
Reference in New Issue
Block a user