From 0ed847b51bb078b9ab24eb733cc4a11d839d70c0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 5 Apr 2019 00:59:32 +0200 Subject: [PATCH] - the resuming of the conversation interrupted by a slideshow must be performed by the game action handler If this is done within the intermission code, both intermission and menu will write to the same global variables and destroy their data, this became very apparent when it altered the screen scale for the conversation. --- src/d_event.h | 1 + src/g_game.cpp | 5 +++++ src/intermission/intermission.cpp | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/d_event.h b/src/d_event.h index 4aeb4979c0..ef54c3a0ff 100644 --- a/src/d_event.h +++ b/src/d_event.h @@ -76,6 +76,7 @@ enum gameaction_t : int ga_screenshot, ga_togglemap, ga_fullconsole, + ga_resumeconversation, }; diff --git a/src/g_game.cpp b/src/g_game.cpp index 0f783ad070..6bfe200e06 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -74,6 +74,7 @@ #include "gi.h" #include "a_dynlight.h" #include "i_system.h" +#include "p_conversation.h" #include "g_hub.h" #include "g_levellocals.h" @@ -1095,6 +1096,10 @@ void G_Ticker () AM_ToggleMap (); gameaction = ga_nothing; break; + case ga_resumeconversation: + P_ResumeConversation (); + gameaction = ga_nothing; + break; default: case ga_nothing: break; diff --git a/src/intermission/intermission.cpp b/src/intermission/intermission.cpp index cc24822201..3e03035c10 100644 --- a/src/intermission/intermission.cpp +++ b/src/intermission/intermission.cpp @@ -804,7 +804,7 @@ void DIntermissionController::Ticker () primaryLevel->SetMusic(); gamestate = GS_LEVEL; wipegamestate = GS_LEVEL; - P_ResumeConversation (); + gameaction = ga_resumeconversation; viewactive = true; Destroy(); break;