diff --git a/README.md b/README.md index 44995eded..49b967dc4 100644 --- a/README.md +++ b/README.md @@ -43,3 +43,10 @@ Special thanks to Coraline of the 3DGE team for allowing us to use her README.md ## How to build Raze To build Raze, please see the [wiki](https://zdoom.org/wiki/) and see the "Programmer's Corner" on the bottom-right corner of the page to build for your platform - use this repository instead of GZDoom's. + +# Resources +- https://raze.zdoom.org/ - Home Page +- https://forum.zdoom.org/viewforum.php?f=351 - Forum +- https://raze.zdoom.org/wiki/ - Wiki +- https://discord.gg/zdoom - Discord Server +- https://docs.google.com/spreadsheets/d/1pvwXEgytkor9SClCiDn4j5AH7FedyXS-ocCbsuQIXDU/edit?usp=sharing - Translation sheet (Google Docs) diff --git a/source/core/music/s_advsound.cpp b/source/core/music/s_advsound.cpp index adb174078..bbe0bf70d 100644 --- a/source/core/music/s_advsound.cpp +++ b/source/core/music/s_advsound.cpp @@ -180,9 +180,11 @@ static void S_AddSNDINFO (int lump) continue; } - if (sc.String[0] == '$') + int cmd; + if (sc.String[0] == '$') cmd = sc.MatchString(SICommandStrings); + else cmd = -1; { // Got a command - switch (sc.MatchString (SICommandStrings)) + switch (cmd) { case SI_MusicVolume: { sc.MustGetString(); diff --git a/source/games/blood/src/seq.cpp b/source/games/blood/src/seq.cpp index f8383ba38..490dfcd62 100644 --- a/source/games/blood/src/seq.cpp +++ b/source/games/blood/src/seq.cpp @@ -386,7 +386,7 @@ void SEQINST::Update() if (snd.isvalid()) { auto udata = soundEngine->GetUserData(snd); - int relVol = udata ? udata[0] : 255; + int relVol = udata ? udata[0] : 80; sfxPlay3DSoundCP(actor, sndId, -1, 0, 0, (surfSfxMove[surf][2] != relVol) ? relVol : surfSfxMove[surf][3]); } } diff --git a/source/games/blood/src/sound.cpp b/source/games/blood/src/sound.cpp index 4ab0445ee..8e1a0f170 100644 --- a/source/games/blood/src/sound.cpp +++ b/source/games/blood/src/sound.cpp @@ -75,11 +75,6 @@ static void S_AddBloodSFX(int lumpnum) if (sfxnum.isvalid()) { soundfx = soundEngine->GetWritableSfx(sfxnum); - if (soundfx->UserData.Size() == 0) - { - soundfx->UserData.Resize(1); - soundfx->UserData[1] = 80; // default for RelVol - } if (!soundfx->bTentative) return; // sound was already defined. } @@ -120,8 +115,11 @@ static void S_AddBloodSFX(int lumpnum) // pitchrange is unused. if (sfx->pitch != 0x10000) soundfx->DefPitch = sfx->pitch / 65536.f; else soundfx->DefPitch = 0; - int* udata = (int*)soundfx->UserData.Data(); - udata[0] = sfx->relVol; + if (sfx->relVol != 80) // 80 is the default + { + soundfx->UserData.Resize(1); + soundfx->UserData[0] = sfx->relVol; + } } } @@ -214,7 +212,7 @@ void sndStartSample(unsigned int nSound, int nVolume, int nChannel, bool bLoop, if (nVolume < 0) { auto udata = soundEngine->GetUserData(snd); - if (udata) nVolume = min(Scale(udata[0], 255, 100), 255); + if (udata) nVolume = min(Scale(udata[0], 255, 80), 255); else nVolume = 255; } if (bLoop) chanflags |= CHANF_LOOP;