changeset 11936:470c8bd99dd6 draft

(svn r16339) -Fix: [NewGRF] When overriding 'original sounds', only allow overriding of the 'original sounds' and not any other that is already loaded.
author rubidium <rubidium@openttd.org>
date Sun, 17 May 2009 17:00:30 +0000
parents afd8caa1ae0d
children 58cf1ef548bb
files src/newgrf.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -2039,8 +2039,8 @@
 			case 0x0A: { // Override old sound
 				uint orig_sound = grf_load_byte(&buf);
 
-				if (orig_sound >= GetNumSounds()) {
-					grfmsg(1, "SoundEffectChangeInfo: Original sound %d not defined (max %d)", orig_sound, GetNumSounds());
+				if (orig_sound >= ORIGINAL_SAMPLE_COUNT) {
+					grfmsg(1, "SoundEffectChangeInfo: Original sound %d not defined (max %d)", orig_sound, ORIGINAL_SAMPLE_COUNT);
 				} else {
 					FileEntry *newfe = GetSound(sound);
 					FileEntry *oldfe = GetSound(orig_sound);