summaryrefslogtreecommitdiff
path: root/src/sound.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-03-19 22:55:29 +0000
committerfrosch <frosch@openttd.org>2012-03-19 22:55:29 +0000
commit0643a6976467fe85ffae88687477c971e45ec596 (patch)
tree42bbce64578c63a6f38582dac5c65826300b7be4 /src/sound.cpp
parent2007f7affdd38a6ef5c7482f99e8d0d831a8bfee (diff)
downloadopenttd-0643a6976467fe85ffae88687477c971e45ec596.tar.xz
(svn r24052) -Fix (r23883) [FS#5107]: Imported GRF sounds were inserted into the wrong slots.
Diffstat (limited to 'src/sound.cpp')
-rw-r--r--src/sound.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sound.cpp b/src/sound.cpp
index f792dfdff..4c7277852 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -218,11 +218,11 @@ static const byte _sound_idx[] = {
void SndCopyToPool()
{
+ SoundEntry *sound = AllocateSound(ORIGINAL_SAMPLE_COUNT);
for (uint i = 0; i < ORIGINAL_SAMPLE_COUNT; i++) {
- SoundEntry *sound = AllocateSound();
- *sound = _original_sounds[_sound_idx[i]];
- sound->volume = _sound_base_vol[i];
- sound->priority = 0;
+ sound[i] = _original_sounds[_sound_idx[i]];
+ sound[i].volume = _sound_base_vol[i];
+ sound[i].priority = 0;
}
}