diff options
Diffstat (limited to 'tools/mapedit/src/world.cpp')
| -rw-r--r-- | tools/mapedit/src/world.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
| diff --git a/tools/mapedit/src/world.cpp b/tools/mapedit/src/world.cpp index 3145e4e..db1201e 100644 --- a/tools/mapedit/src/world.cpp +++ b/tools/mapedit/src/world.cpp | |||
| @@ -135,7 +135,7 @@ World::World(std::string filename) | |||
| 135 | } else if (!xmlStrcmp(entityDataNode->name, (const xmlChar*) "entity-position")) | 135 | } else if (!xmlStrcmp(entityDataNode->name, (const xmlChar*) "entity-position")) |
| 136 | { | 136 | { |
| 137 | xmlChar* key = xmlNodeListGetString(doc, entityDataNode->xmlChildrenNode, 1); | 137 | xmlChar* key = xmlNodeListGetString(doc, entityDataNode->xmlChildrenNode, 1); |
| 138 | sscanf((char*) key, "%lf,%lf", &data->position.first, &data->position.second); | 138 | sscanf((char*) key, "%d,%d", &data->position.first, &data->position.second); |
| 139 | xmlFree(key); | 139 | xmlFree(key); |
| 140 | } | 140 | } |
| 141 | } | 141 | } |
| @@ -268,6 +268,8 @@ void World::save(std::string name, wxTreeCtrl* mapTree) | |||
| 268 | { | 268 | { |
| 269 | Map& map = *mapPair.second; | 269 | Map& map = *mapPair.second; |
| 270 | 270 | ||
| 271 | if (map.getHidden()) continue; | ||
| 272 | |||
| 271 | // <map> | 273 | // <map> |
| 272 | rc = xmlTextWriterStartElement(writer, (xmlChar*) "map"); | 274 | rc = xmlTextWriterStartElement(writer, (xmlChar*) "map"); |
| 273 | if (rc < 0) throw MapWriteException(name); | 275 | if (rc < 0) throw MapWriteException(name); |
