From 3f5ef48dacc08bf85741fafbeaee05242d0a1594 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 26 Feb 2017 17:22:02 +0100 Subject: [PATCH] - allow setting a global dialogue lump through gameinfo. --- src/gi.cpp | 1 + src/gi.h | 1 + src/p_conversation.cpp | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/src/gi.cpp b/src/gi.cpp index fa8afb545..672ca3263 100644 --- a/src/gi.cpp +++ b/src/gi.cpp @@ -374,6 +374,7 @@ void FMapInfoParser::ParseGameInfo() GAMEINFOKEY_PATCH(mStatscreenEnteringFont, "statscreen_enteringpatch") GAMEINFOKEY_BOOL(norandomplayerclass, "norandomplayerclass") GAMEINFOKEY_BOOL(forcekillscripts, "forcekillscripts") // [JM] Force kill scripts on thing death. (MF7_NOKILLSCRIPTS overrides.) + GAMEINFOKEY_STRING(Dialogue, "dialogue") else { diff --git a/src/gi.h b/src/gi.h index 24053b002..2c614e3c7 100644 --- a/src/gi.h +++ b/src/gi.h @@ -176,6 +176,7 @@ struct gameinfo_t FName DefaultEndSequence; FString mMapArrow, mCheatMapArrow; FString mEasyKey, mCheatKey; + FString Dialogue; FGIFont mStatscreenMapNameFont; FGIFont mStatscreenFinishedFont; FGIFont mStatscreenEnteringFont; diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 90271333c..f43313682 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -205,6 +205,11 @@ void P_LoadStrifeConversations (MapData *map, const char *mapname) { if (!LoadScriptFile (scriptname_b, false, 1)) { + if (gameinfo.Dialogue.IsNotEmpty()) + { + if (LoadScriptFile(gameinfo.Dialogue, false, 0)) return; + } + LoadScriptFile ("SCRIPT00", false, 1); } }