mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- fixed: The summary screen in Duke and RR was blocking without explicit user input.
It must check for the actual sound that was played, because at least in Duke the looping music is still playing. Fixes #367
This commit is contained in:
parent
9bb99e5c05
commit
de7da0d4d7
2 changed files with 8 additions and 4 deletions
|
@ -767,6 +767,7 @@ class DDukeLevelSummaryScreen : public DScreenJob
|
|||
const char* lastmapname;
|
||||
int gfx_offset;
|
||||
int bonuscnt = 0;
|
||||
int speech = -1;
|
||||
|
||||
void SetTotalClock(int tc)
|
||||
{
|
||||
|
@ -911,7 +912,8 @@ public:
|
|||
bonuscnt++;
|
||||
S_PlaySound(SHOTGUN_COCK, CHAN_AUTO, CHANF_UI);
|
||||
static const uint16_t speeches[] = { BONUS_SPEECH1, BONUS_SPEECH2, BONUS_SPEECH3, BONUS_SPEECH4};
|
||||
S_PlaySound(speeches[(rand() & 3)], CHAN_AUTO, CHANF_UI, 1);
|
||||
speech = speeches[(rand() & 3)];
|
||||
S_PlaySound(speech, CHAN_AUTO, CHANF_UI, 1);
|
||||
}
|
||||
case 1:
|
||||
case 4:
|
||||
|
@ -926,7 +928,7 @@ public:
|
|||
}
|
||||
else if (currentclock > (10240 + 120L))
|
||||
{
|
||||
if (!skiprequest && soundEngine->GetSoundPlayingInfo(SOURCE_None, nullptr, -1)) return 1;
|
||||
if (speech > 0 && !skiprequest && soundEngine->GetSoundPlayingInfo(SOURCE_None, nullptr, speech)) return 1;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -358,6 +358,7 @@ class DRRLevelSummaryScreen : public DScreenJob
|
|||
const char* lastmapname;
|
||||
int gfx_offset;
|
||||
int bonuscnt = 0;
|
||||
int speech = -1;
|
||||
|
||||
void SetTotalClock(int tc)
|
||||
{
|
||||
|
@ -502,13 +503,14 @@ public:
|
|||
{
|
||||
bonuscnt++;
|
||||
S_PlaySound(425, CHAN_AUTO, CHANF_UI);
|
||||
S_PlaySound(BONUS_SPEECH1 + (rand() & 3), CHAN_AUTO, CHANF_UI);
|
||||
speech = BONUS_SPEECH1 + (rand() & 3);
|
||||
S_PlaySound(speech, CHAN_AUTO, CHANF_UI);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (currentclock > (10240 + 120L))
|
||||
{
|
||||
if (!skiprequest && soundEngine->GetSoundPlayingInfo(SOURCE_None, nullptr, -1)) return 1;
|
||||
if (speech > 0 && !skiprequest && soundEngine->GetSoundPlayingInfo(SOURCE_None, nullptr, speech)) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue