From 000c00dc919d1e62befcc5026b933b4f1820ca61 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 11 Aug 2020 00:42:08 +0200 Subject: [PATCH] - block game input during intro cutscenes Fixes #158 --- source/common/engine/d_event.cpp | 3 +++ source/games/duke/src/gameloop.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/common/engine/d_event.cpp b/source/common/engine/d_event.cpp index 6534b8d9a..b42761254 100644 --- a/source/common/engine/d_event.cpp +++ b/source/common/engine/d_event.cpp @@ -42,6 +42,7 @@ #include "m_joy.h" #include "vm.h" #include "cheathandler.h" +#include "gamestate.h" bool G_Responder(event_t* ev); @@ -70,6 +71,8 @@ void D_ProcessEvents (void) continue; if (ev->type == EV_DeviceChange) UpdateJoystickMenu(I_UpdateDeviceList()); + if (gamestate == GS_INTRO) + continue; if (C_Responder (ev)) continue; // console ate the event if (M_Responder (ev)) diff --git a/source/games/duke/src/gameloop.cpp b/source/games/duke/src/gameloop.cpp index 50b443e0b..8f535bf09 100644 --- a/source/games/duke/src/gameloop.cpp +++ b/source/games/duke/src/gameloop.cpp @@ -387,10 +387,10 @@ bool GameTicker() void startmainmenu() { + gamestate = GS_DEMOSCREEN; M_StartControlPanel(false); M_SetMenu(NAME_Mainmenu); FX_StopAllSounds(); - gamestate = GS_DEMOSCREEN; } //---------------------------------------------------------------------------