mirror of
https://github.com/DrBeef/Doom3Quest.git
synced 2024-11-10 06:41:36 +00:00
Ensure that virutal screen is used when loading between levels
This commit is contained in:
parent
6355e3ba48
commit
c325f3cdb3
3 changed files with 18 additions and 9 deletions
|
@ -132,6 +132,7 @@ bool inMenu = false;
|
|||
bool inGameGuiActive = false;
|
||||
bool objectiveSystemActive = false;
|
||||
bool inCinematic = false;
|
||||
bool loading = false;
|
||||
|
||||
void Doom3Quest_setUseScreenLayer(int screen)
|
||||
{
|
||||
|
@ -139,12 +140,12 @@ void Doom3Quest_setUseScreenLayer(int screen)
|
|||
inGameGuiActive = !!(screen & 0x2);
|
||||
objectiveSystemActive = !!(screen & 0x4);
|
||||
inCinematic = !!(screen & 0x8);
|
||||
loading = !!(screen & 0x10);
|
||||
}
|
||||
|
||||
bool Doom3Quest_useScreenLayer()
|
||||
{
|
||||
//Cinematics are now first person
|
||||
return inMenu || forceVirtualScreen || inCinematic;
|
||||
return inMenu || forceVirtualScreen || inCinematic || loading;
|
||||
}
|
||||
|
||||
static void UnEscapeQuotes( char *arg )
|
||||
|
|
|
@ -2397,7 +2397,6 @@ void idCommonLocal::InitSIMD( void ) {
|
|||
}
|
||||
|
||||
|
||||
extern "C" void Doom3Quest_setUseScreenLayer(int use);
|
||||
extern "C" void Doom3Quest_FrameSetup(int controlscheme);
|
||||
extern "C" void Doom3Quest_Vibrate(int channel, float low, float high );
|
||||
|
||||
|
@ -2419,12 +2418,6 @@ void idCommonLocal::Frame( void ) {
|
|||
// pump all the events
|
||||
Sys_GenerateEvents();
|
||||
|
||||
int inMenu = (((idSessionLocal*)session)->guiActive != 0);
|
||||
int inGameGui = ( game && game->InGameGuiActive());
|
||||
int objectiveActive = ( game && game->ObjectiveSystemActive());
|
||||
int cinematic = ( game && game->InCinematic());
|
||||
|
||||
Doom3Quest_setUseScreenLayer(inMenu?1:0 + inGameGui?2:0 + objectiveActive?4:0 + cinematic?8:0);
|
||||
Doom3Quest_FrameSetup(cvarSystem->GetCVarInteger("vr_controlscheme"));
|
||||
|
||||
if (game) {
|
||||
|
|
|
@ -2383,6 +2383,19 @@ void idSessionLocal::PacifierUpdate() {
|
|||
idAsyncNetwork::server.PacifierUpdate();
|
||||
}
|
||||
|
||||
extern "C" void Doom3Quest_setUseScreenLayer(int use);
|
||||
|
||||
void setupScreenLayer()
|
||||
{
|
||||
int inMenu = (((idSessionLocal*)session)->guiActive != 0);
|
||||
int inGameGui = ( game && game->InGameGuiActive());
|
||||
int objectiveActive = ( game && game->ObjectiveSystemActive());
|
||||
int cinematic = ( game && game->InCinematic());
|
||||
bool loading = (((idSessionLocal*)session)->insideExecuteMapChange);
|
||||
|
||||
Doom3Quest_setUseScreenLayer(inMenu?1:0 + inGameGui?2:0 + objectiveActive?4:0 + cinematic?8:0 + loading?16:0);
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
idSessionLocal::Draw
|
||||
|
@ -2391,6 +2404,8 @@ idSessionLocal::Draw
|
|||
void idSessionLocal::Draw() {
|
||||
bool fullConsole = false;
|
||||
|
||||
setupScreenLayer();
|
||||
|
||||
if ( insideExecuteMapChange ) {
|
||||
if ( guiLoading ) {
|
||||
guiLoading->Redraw( com_frameTime );
|
||||
|
|
Loading…
Reference in a new issue