Author: mordante
Date: Sun Nov 4 21:14:24 2007
New Revision: 21494
URL: http://svn.gna.org/viewcvs/wesnoth?rev=21494&view=rev
Log:
Fixed a bug when shifting the map, the starting positions weren't
updated correctly (bug #10216).
Modified:
trunk/changelog
trunk/players_changelog
trunk/src/editor/map_manip.cpp
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=21494&r1=21493&r2=21494&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sun Nov 4 21:14:24 2007
@@ -35,6 +35,8 @@
* 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
Modified: trunk/players_changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/players_changelog?rev=21494&r1=21493&r2=21494&view=diff
==============================================================================
--- trunk/players_changelog (original)
+++ trunk/players_changelog Sun Nov 4 21:14:24 2007
@@ -31,6 +31,8 @@
* 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,
Modified: trunk/src/editor/map_manip.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor/map_manip.cpp?rev=21494&r1=21493&r2=21494&view=diff
==============================================================================
--- trunk/src/editor/map_manip.cpp (original)
+++ trunk/src/editor/map_manip.cpp Sun Nov 4 21:14:24 2007
@@ -80,6 +80,17 @@
} else if(top_resize < 0) {
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();
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits