mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-07-07 19:45:00 +00:00
Move saving outside of MetaData (oops!)
This commit is contained in:
parent
65bc279378
commit
d3bfdd945b
1 changed files with 15 additions and 14 deletions
|
@ -1566,20 +1566,6 @@ bool customlevelclass::save(const std::string& _path)
|
|||
}
|
||||
}
|
||||
|
||||
if (player_colour != 0)
|
||||
{
|
||||
xml::update_tag(msg, "PlayerColour", player_colour);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get rid of this one as well, since older levels don't have this property anyways
|
||||
tinyxml2::XMLElement* element;
|
||||
while ((element = msg->FirstChildElement("PlayerColour")) != NULL)
|
||||
{
|
||||
doc.DeleteNode(element);
|
||||
}
|
||||
}
|
||||
|
||||
xml::update_tag(data, "mapwidth", mapwidth);
|
||||
|
||||
xml::update_tag(data, "mapheight", mapheight);
|
||||
|
@ -1699,6 +1685,21 @@ bool customlevelclass::save(const std::string& _path)
|
|||
}
|
||||
xml::update_tag(data, "script", scriptString.c_str());
|
||||
|
||||
|
||||
if (player_colour != 0)
|
||||
{
|
||||
xml::update_tag(data, "PlayerColour", player_colour);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get rid of this one as well, since older levels don't have this property anyways
|
||||
tinyxml2::XMLElement* element;
|
||||
while ((element = data->FirstChildElement("PlayerColour")) != NULL)
|
||||
{
|
||||
doc.DeleteNode(element);
|
||||
}
|
||||
}
|
||||
|
||||
return FILESYSTEM_saveTiXml2Document(newpath.c_str(), doc);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue