- bugfixes for load / save game for in progress joining

This commit is contained in:
Mark Vejvoda
2013-02-19 06:41:56 +00:00
parent 69925fb887
commit 8916a86b8c
20 changed files with 146 additions and 118 deletions

View File

@@ -613,6 +613,18 @@ bool XmlNode::hasAttribute(const string &name) const {
return result;
}
int XmlNode::clearChild(const string &childName) {
int clearChildCount = 0;
for(int i = children.size()-1; i >= 0; --i) {
if(children[i]->getName() == childName) {
delete children[i];
children.erase(children.begin()+i);
clearChildCount++;
}
}
return clearChildCount;
}
XmlNode *XmlNode::getChild(unsigned int i) const {
assert(!superNode);
if(i >= children.size()) {