mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-12 09:09:09 +00:00
(svn r16339) -Fix: [NewGRF] When overriding 'original sounds', only allow overriding of the 'original sounds' and not any other that is already loaded.
This commit is contained in:
@@ -2039,8 +2039,8 @@ static ChangeInfoResult SoundEffectChangeInfo(uint sid, int numinfo, int prop, b
|
|||||||
case 0x0A: { // Override old sound
|
case 0x0A: { // Override old sound
|
||||||
uint orig_sound = grf_load_byte(&buf);
|
uint orig_sound = grf_load_byte(&buf);
|
||||||
|
|
||||||
if (orig_sound >= GetNumSounds()) {
|
if (orig_sound >= ORIGINAL_SAMPLE_COUNT) {
|
||||||
grfmsg(1, "SoundEffectChangeInfo: Original sound %d not defined (max %d)", orig_sound, GetNumSounds());
|
grfmsg(1, "SoundEffectChangeInfo: Original sound %d not defined (max %d)", orig_sound, ORIGINAL_SAMPLE_COUNT);
|
||||||
} else {
|
} else {
|
||||||
FileEntry *newfe = GetSound(sound);
|
FileEntry *newfe = GetSound(sound);
|
||||||
FileEntry *oldfe = GetSound(orig_sound);
|
FileEntry *oldfe = GetSound(orig_sound);
|
||||||
|
Reference in New Issue
Block a user