(svn r16337) -Codechange: remove pointless variable + wrapper function; having it return anything else than ORIGINAL_SAMPLE_COUNT is asking for NewGRFs failing to load (due to invalid sample index), thus desyncs

This commit is contained in:
rubidium
2009-05-17 14:57:14 +00:00
parent 10ea72a08e
commit 83dc6ef6e6
5 changed files with 7 additions and 15 deletions

View File

@@ -2020,7 +2020,7 @@ static ChangeInfoResult SoundEffectChangeInfo(uint sid, int numinfo, int prop, b
}
for (int i = 0; i < numinfo; i++) {
uint sound = sid + i + _cur_grffile->sound_offset - GetNumOriginalSounds();
uint sound = sid + i + _cur_grffile->sound_offset - ORIGINAL_SAMPLE_COUNT;
if (sound >= GetNumSounds()) {
grfmsg(1, "SoundEffectChangeInfo: Sound %d not defined (max %d)", sound, GetNumSounds());