From 6c57441bcdaa701658900f46b4e0a2b984e28662 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 24 Aug 2010 13:57:17 +0000 Subject: [PATCH] - fixed: The UDMF check for dialogues without owning class needs to be relaxed. A dialogue with an id and no class is a valid construct. - fixed: Trying to assign a non-existent dialogue to an actor in UDMF partially overwrote the default dialogue. SVN r2579 (trunk) --- src/p_mobj.cpp | 6 ++++-- src/p_usdf.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 2b9da7a54..85ca7662e 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -4398,9 +4398,11 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position) // Check if this actor's mapthing has a conversation defined if (mthing->Conversation > 0) { - mobj->ConversationRoot = GetConversation(mthing->Conversation); - if (mobj->ConversationRoot != -1) + // Make sure that this does not partially overwrite the default dialogue settings. + int root = GetConversation(mthing->Conversation); + if (root != -1) { + mobj->ConversationRoot = root; mobj->Conversation = StrifeDialogues[mobj->ConversationRoot]; } } diff --git a/src/p_usdf.cpp b/src/p_usdf.cpp index 7bcca2204..b831b4140 100644 --- a/src/p_usdf.cpp +++ b/src/p_usdf.cpp @@ -407,7 +407,7 @@ class USDFParser : public UDMFParserBase } } } - if (type == NULL) + if (type == NULL && dlgid == 0) { sc.ScriptMessage("No valid actor type defined in conversation."); return false;