mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- fixed sprite changing logic for developer commentaries and attenuate the music while commentaries are playing.
This commit is contained in:
parent
392c9ec0d6
commit
a5984ddc7c
2 changed files with 7 additions and 3 deletions
|
@ -267,8 +267,8 @@ bool checkhitswitch_d(int snum, int w, int switchtype)
|
|||
case DEVELOPERCOMMENTARY + 1: //Twentieth Anniversary World Tour
|
||||
if (switchtype == 1)
|
||||
{
|
||||
sprite[w].picnum--;
|
||||
StopCommentary();
|
||||
sprite[w].picnum = DEVELOPERCOMMENTARY;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -276,7 +276,7 @@ bool checkhitswitch_d(int snum, int w, int switchtype)
|
|||
if (switchtype == 1)
|
||||
{
|
||||
if (StartCommentary(lotag, w))
|
||||
sprite[w].picnum++;
|
||||
sprite[w].picnum = DEVELOPERCOMMENTARY+1;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -43,6 +43,8 @@ source as it is released.
|
|||
#include "mapinfo.h"
|
||||
#include "raze_sound.h"
|
||||
#include "gamestate.h"
|
||||
#include "names_d.h"
|
||||
#include "i_music.h"
|
||||
|
||||
CVAR(Bool, wt_forcemidi, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) // quick hack to disable the oggs, which are of lower quality than playing the MIDIs with a good synth and sound font.
|
||||
CVAR(Bool, wt_forcevoc, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) // The same for sound effects. The re-recordings are rather poor and disliked
|
||||
|
@ -88,7 +90,8 @@ public:
|
|||
{
|
||||
UnloadSound(schan->SoundID);
|
||||
currentCommentarySound = 0;
|
||||
sprite[currentCommentarySprite].picnum--;
|
||||
sprite[currentCommentarySprite].picnum = DEVELOPERCOMMENTARY;
|
||||
I_SetRelativeVolume(1.0f);
|
||||
}
|
||||
SoundEngine::SoundDone(schan);
|
||||
}
|
||||
|
@ -831,6 +834,7 @@ bool StartCommentary(int tag, int sprnum)
|
|||
soundEngine->StartSound(SOURCE_None, nullptr, nullptr, CHAN_VOICE, CHANF_UI | CHANF_TRANSIENT | CHANF_OVERLAP, id, 1.f, 0.f);
|
||||
currentCommentarySound = id;
|
||||
currentCommentarySprite = sprnum;
|
||||
I_SetRelativeVolume(0.25f);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue