From 4e2385e9125c2a397e8035213b822914888a5e05 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Tue, 17 Jul 2018 12:56:23 +0300 Subject: [PATCH] - load common conversation lumps regardless of map naming scheme https://forum.zdoom.org/viewtopic.php?t=61313 --- src/p_conversation.cpp | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index cce572976f..6364835a0e 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -187,25 +187,27 @@ void P_LoadStrifeConversations (MapData *map, const char *mapname) } else { - if (strnicmp (mapname, "MAP", 3) != 0) + if (strnicmp (mapname, "MAP", 3) == 0) { - return; - } - char scriptname_b[9] = { 'S','C','R','I','P','T',mapname[3],mapname[4],0 }; - char scriptname_t[9] = { 'D','I','A','L','O','G',mapname[3],mapname[4],0 }; + char scriptname_b[9] = { 'S','C','R','I','P','T',mapname[3],mapname[4],0 }; + char scriptname_t[9] = { 'D','I','A','L','O','G',mapname[3],mapname[4],0 }; - if (!LoadScriptFile(scriptname_t, false, 2)) - { - if (!LoadScriptFile (scriptname_b, false, 1)) + if ( LoadScriptFile(scriptname_t, false, 2) + || LoadScriptFile(scriptname_b, false, 1)) { - if (gameinfo.Dialogue.IsNotEmpty()) - { - if (LoadScriptFile(gameinfo.Dialogue, false, 0)) return; - } - - LoadScriptFile ("SCRIPT00", false, 1); + return; } } + + if (gameinfo.Dialogue.IsNotEmpty()) + { + if (LoadScriptFile(gameinfo.Dialogue, false, 0)) + { + return; + } + } + + LoadScriptFile("SCRIPT00", false, 1); } }