diff --git a/src/p_buildmap.cpp b/src/p_buildmap.cpp index 739c515cfd..82a7095717 100644 --- a/src/p_buildmap.cpp +++ b/src/p_buildmap.cpp @@ -703,9 +703,10 @@ static int LoadSprites (spritetype *sprites, Xsprite *xsprites, int numsprites, mapthings[count].args[0] = xsprites[i].Data3; // I am totally guessing abount the volume level. 50 seems to be a pretty // typical value for Blood's standard maps, so I assume it's 100-based. - mapthings[count].args[1] = xsprites[i].Data4 * 128 / 100; + mapthings[count].args[1] = xsprites[i].Data4; mapthings[count].args[2] = xsprites[i].Data1; mapthings[count].args[3] = xsprites[i].Data2; + mapthings[count].args[4] = 0; mapthings[count].type = 14065; } else diff --git a/src/s_advsound.cpp b/src/s_advsound.cpp index 40bf0f95cb..1ab3558acf 100644 --- a/src/s_advsound.cpp +++ b/src/s_advsound.cpp @@ -1975,7 +1975,7 @@ void AAmbientSound::Tick () // The second argument scales the ambient sound's volume. // 0 and 128 are normal volume. The maximum volume level // possible is always 1. - float volscale = args[1] == 0 ? 1 : args[1] / 128.f; + float volscale = args[1] == 0 ? 1 : args[1] / 100.f; float usevol = clamp(ambient->volume * volscale, 0.f, 1.f); // The third argument is the minimum distance for audible fading, and @@ -1988,7 +1988,14 @@ void AAmbientSound::Tick () } else { - S_SoundMinMaxDist(this, CHAN_BODY | loop, ambient->sound, usevol, float(args[2]), float(args[3])); + float min = float(args[2]), max = float(args[3]); + // The fifth argument acts as a scalar for the preceding two, if it's non-zero. + if (args[4] != 0) + { + min *= args[4]; + max *= args[4]; + } + S_SoundMinMaxDist(this, CHAN_BODY | loop, ambient->sound, usevol, min, max); } if (!loop) {