(svn r6611) - Newsounds:

- If the NewGRF sound effect chosen doesn't exist, then ignore it.
  - Play load/unload sound if provided.
This commit is contained in:
peter1138
2006-10-01 17:56:38 +00:00
parent 7c8bba7b68
commit 33e8c26c38
2 changed files with 5 additions and 2 deletions

View File

@@ -68,6 +68,6 @@ bool PlayVehicleSound(const Vehicle *v, VehicleSoundEvent event)
if (callback == CALLBACK_FAILED) return false;
if (callback >= GetNumOriginalSounds()) callback += file->sound_offset - GetNumOriginalSounds();
SndPlayVehicleFx(callback, v);
if (callback < GetNumSounds()) SndPlayVehicleFx(callback, v);
return true;
}