Don't drop unused talk nodes on saving if they still contain text

This commit is contained in:
2015-07-10 15:28:34 -04:00
parent 6852479a4c
commit 8504245e5a

View File

@@ -794,7 +794,8 @@ static void writeDialogueToXml(ticpp::Printer&& data, cSpeech& talk, int town_nu
}
for(size_t i = 0; i < talk.talk_nodes.size(); i++) {
cSpeech::cNode& node = talk.talk_nodes[i];
if(node.personality == -1) continue;
// Don't drop unused nodes if they still contain text
if(node.personality == -1 && node.str1.empty() && node.str2.empty()) continue;
// TODO: Is it safe to assume the two links run together like this?
if(std::string(node.link1, 8) == "xxxxxxxx" && node.str1.empty() && node.str2.empty())
continue;