mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-20 00:11:19 +00:00
Implement music switching for prompts
This commit is contained in:
parent
3d9ce630d2
commit
631c6f93f5
1 changed files with 10 additions and 0 deletions
|
@ -2172,6 +2172,11 @@ static void F_AdvanceToNextPage(void)
|
|||
// on timer mode, number of tics until page advances
|
||||
timetonext = textprompts[cutnum]->page[scenenum].timetonext ? textprompts[cutnum]->page[scenenum].timetonext : TICRATE/10;
|
||||
F_PreparePageText(textprompts[cutnum]->page[scenenum].text);
|
||||
|
||||
if (textprompts[cutnum]->page[scenenum].musswitch[0])
|
||||
S_ChangeMusic(textprompts[cutnum]->page[scenenum].musswitch,
|
||||
textprompts[cutnum]->page[scenenum].musswitchflags,
|
||||
textprompts[cutnum]->page[scenenum].musicloop);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2228,6 +2233,11 @@ void F_StartTextPrompt(INT32 promptnum, INT32 pagenum, mobj_t *mo, UINT16 postex
|
|||
// on timer mode, number of tics until page advances
|
||||
timetonext = textprompts[cutnum]->page[scenenum].timetonext ? textprompts[cutnum]->page[scenenum].timetonext : TICRATE/10;
|
||||
F_PreparePageText(textprompts[cutnum]->page[scenenum].text);
|
||||
|
||||
if (textprompts[cutnum]->page[scenenum].musswitch[0])
|
||||
S_ChangeMusic(textprompts[cutnum]->page[scenenum].musswitch,
|
||||
textprompts[cutnum]->page[scenenum].musswitchflags,
|
||||
textprompts[cutnum]->page[scenenum].musicloop);
|
||||
}
|
||||
else
|
||||
F_EndTextPrompt(true, false); // run the post-effects immediately
|
||||
|
|
Loading…
Reference in a new issue