- Fixed: Pressing a key to advance an intermission screen only worked on

the local computer.



SVN r3328 (trunk)
This commit is contained in:
Randy Heit 2011-12-06 02:51:32 +00:00
commit 8e8331d44c
5 changed files with 37 additions and 3 deletions

View file

@ -50,6 +50,7 @@
#include "g_level.h"
#include "p_conversation.h"
#include "menu/menu.h"
#include "d_net.h"
FIntermissionDescriptorList IntermissionDescriptors;
@ -769,7 +770,11 @@ bool DIntermissionController::Responder (event_t *ev)
if (mScreen->mTicker < 2) return false; // prevent some leftover events from auto-advancing
int res = mScreen->Responder(ev);
mAdvance = (res == -1);
if (res == -1 && !mSentAdvance)
{
Net_WriteByte(DEM_ADVANCEINTER);
mSentAdvance = true;
}
return !!res;
}
return false;
@ -777,6 +782,10 @@ bool DIntermissionController::Responder (event_t *ev)
void DIntermissionController::Ticker ()
{
if (mAdvance)
{
mSentAdvance = false;
}
if (mScreen != NULL)
{
mAdvance |= (mScreen->Ticker() == -1);
@ -926,3 +935,18 @@ void F_EndFinale ()
DIntermissionController::CurrentIntermission = NULL;
}
}
//==========================================================================
//
// Called by net loop.
//
//==========================================================================
void F_AdvanceIntermission()
{
if (DIntermissionController::CurrentIntermission != NULL)
{
DIntermissionController::CurrentIntermission->mAdvance = true;
}
}