Merge branch 'master' into jgrpp
# Conflicts: # src/landscape.cpp # src/landscape.h # src/misc_gui.cpp # src/newgrf_commons.cpp # src/order_cmd.cpp # src/pathfinder/yapf/yapf_base.hpp # src/station_cmd.cpp # src/tunnelbridge_cmd.cpp # src/vehicle.cpp # src/water_cmd.cpp # src/window.cpp
This commit is contained in:
@@ -3191,7 +3191,7 @@ static ChangeInfoResult SoundEffectChangeInfo(uint sid, int numinfo, int prop, c
|
||||
|
||||
switch (prop) {
|
||||
case 0x08: // Relative volume
|
||||
sound->volume = buf->ReadByte();
|
||||
sound->volume = Clamp(buf->ReadByte(), 0, SOUND_EFFECT_MAX_VOLUME);
|
||||
break;
|
||||
|
||||
case 0x09: // Priority
|
||||
@@ -8775,7 +8775,7 @@ static void ImportGRFSound(SoundEntry *sound)
|
||||
*sound = *GetSound(file->sound_offset + sound_id);
|
||||
|
||||
/* Reset volume and priority, which TTDPatch doesn't copy */
|
||||
sound->volume = 128;
|
||||
sound->volume = SOUND_EFFECT_MAX_VOLUME;
|
||||
sound->priority = 0;
|
||||
}
|
||||
|
||||
@@ -8787,7 +8787,7 @@ static void ImportGRFSound(SoundEntry *sound)
|
||||
static void LoadGRFSound(size_t offs, SoundEntry *sound)
|
||||
{
|
||||
/* Set default volume and priority */
|
||||
sound->volume = 0x80;
|
||||
sound->volume = SOUND_EFFECT_MAX_VOLUME;
|
||||
sound->priority = 0;
|
||||
|
||||
if (offs != SIZE_MAX) {
|
||||
|
Reference in New Issue
Block a user