mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03:00
Move saving outside of MetaData (oops!)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user