Added ready system to screen jobs for multiplayer
Readds the feature to allow players to ready up during stat screens and intermissions instead of autoskipping based on whoever closed it. Comes with a variety of ways to tweak this behavior such as percentage-based auto starting (with a timer), the ability to unready as needed, and who can control it. Players will still be able to skip through individual screen jobs within the runner while waiting to ready up.
This commit is contained in:
parent
fc7a480fe8
commit
fae43b8120
16 changed files with 493 additions and 39 deletions
|
|
@ -1048,9 +1048,10 @@ DIntermissionController* FLevelLocals::CreateIntermission()
|
|||
//
|
||||
//=============================================================================
|
||||
|
||||
void RunIntermission(level_info_t* fromMap, level_info_t* toMap, DIntermissionController* intermissionScreen, DObject* statusScreen, std::function<void(bool)> completionf)
|
||||
void RunIntermission(level_info_t* fromMap, level_info_t* toMap, DIntermissionController* intermissionScreen, DObject* statusScreen, bool ending, std::function<void(bool)> completionf)
|
||||
{
|
||||
cutscene.runner = CreateRunner(false);
|
||||
// Make sure the finale can't be skipped, otherwise the intermission always needs to be skippable.
|
||||
cutscene.runner = CreateRunner(false, ending ? ST_UNSKIPPABLE : ST_MUST_BE_SKIPPABLE);
|
||||
GC::WriteBarrier(cutscene.runner);
|
||||
cutscene.completion = std::move(completionf);
|
||||
|
||||
|
|
@ -1139,7 +1140,7 @@ void G_DoCompleted (void)
|
|||
bool endgame = strncmp(nextlevel.GetChars(), "enDSeQ", 6) == 0;
|
||||
intermissionScreen = primaryLevel->CreateIntermission();
|
||||
auto nextinfo = !playinter || endgame? nullptr : FindLevelInfo(nextlevel.GetChars(), false);
|
||||
RunIntermission(primaryLevel->info, nextinfo, intermissionScreen, statusScreen, [=](bool)
|
||||
RunIntermission(primaryLevel->info, nextinfo, intermissionScreen, statusScreen, endgame, [=](bool)
|
||||
{
|
||||
if (!endgame) primaryLevel->WorldDone();
|
||||
else D_StartTitle();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue