Use spaces instead of 'x' for an inactive dialogue keyword
This commit is contained in:
@@ -1076,6 +1076,7 @@ void refresh_talking() {
|
||||
}
|
||||
|
||||
short scan_for_response(const char *str) {
|
||||
if(strnicmp(str, " ", 4) == 1) return -1;
|
||||
cSpeech talk = univ.town.cur_talk();
|
||||
for(short i = 0; i < talk.talk_nodes.size(); i++) {
|
||||
cSpeech::cNode node = talk.talk_nodes[i];
|
||||
|
@@ -43,8 +43,8 @@ public:
|
||||
std::string str1, str2;
|
||||
cNode() {
|
||||
std::fill(extras, extras + 4, -1);
|
||||
std::fill(link1, link1 + 4, 'x');
|
||||
std::fill(link2, link2 + 4, 'x');
|
||||
std::fill(link1, link1 + 4, ' ');
|
||||
std::fill(link2, link2 + 4, ' ');
|
||||
}
|
||||
};
|
||||
cPersonality people[10];
|
||||
|
@@ -817,13 +817,13 @@ void writeDialogueToXml(ticpp::Printer&& data, cSpeech& talk, int town_num) {
|
||||
// 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())
|
||||
if(std::string(node.link1, 8) == " " && node.str1.empty() && node.str2.empty())
|
||||
continue;
|
||||
data.OpenElement("node");
|
||||
data.PushAttribute("for", node.personality);
|
||||
if(std::string(node.link1, 4) != "xxxx")
|
||||
if(std::string(node.link1, 4) != " ")
|
||||
data.PushElement("keyword", std::string(node.link1, 4));
|
||||
if(std::string(node.link2, 4) != "xxxx")
|
||||
if(std::string(node.link2, 4) != " ")
|
||||
data.PushElement("keyword", std::string(node.link2, 4));
|
||||
data.PushElement("type", node.type);
|
||||
if(node.extras[0] >= 0 || node.extras[1] >= 0 || node.extras[2] >= 0 || node.extras[3] >= 0)
|
||||
|
@@ -1068,7 +1068,7 @@ static bool talk_node_branch(cDialog& me, std::stack<node_ref_t>& talk_edit_stac
|
||||
|
||||
int spec = -1;
|
||||
for(int j = 0; j < town->talking.talk_nodes.size(); j++)
|
||||
if(town->talking.talk_nodes[j].personality == -1 && strnicmp(town->talking.talk_nodes[j].link1, "xxxx", 4) == 0) {
|
||||
if(town->talking.talk_nodes[j].personality == -1 && strnicmp(town->talking.talk_nodes[j].link1, " ", 4) == 0) {
|
||||
spec = j;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user