Fixed a bug when shifting the map,

the starting positions weren't updated correctly (bug #10216).
This commit is contained in:
Mark de Wever 2007-11-04 20:14:24 +00:00
parent 363b3a85b7
commit c8659b21e7
3 changed files with 15 additions and 0 deletions

View file

@ -35,6 +35,8 @@ Version 1.3.9+svn:
* map editor:
* fixed a bug when two dimensions of a map were modified, the editor
could crash (bug #10216)
* fixed a bug when shifting the map, the starting positions weren't
updated correctly (bug #10216)
* multiplayer:
* revised maps: Den of Onis, Silverhead Crossing, Sulla's Ruins,
Weldyn Channel, Blue Water Province

View file

@ -31,6 +31,8 @@ Version 1.3.9+svn:
* map editor:
* Fixed a bug, when two dimensions of a map were modified, the editor
could crash.
* Fixed a bug when shifting the map, the starting positions weren't
updated correctly.
* Multiplayer
* Revised maps: Den of Onis, Silverhead Crossing, Sulla's Ruins,

View file

@ -81,6 +81,17 @@ std::string editormap::resize(const size_t width, const size_t height,
remove_tiles_top(-top_resize);
}
// fix the starting positions
if(x_offset || y_offset) {
for(size_t i = 0; i < STARTING_POSITIONS; ++i) {
if(startingPositions_[i] != gamemap::location()) {
startingPositions_[i].x -= x_offset;
startingPositions_[i].y -= y_offset;
}
}
}
return write();
}