Author: soliton
Date: Fri Sep 26 17:10:25 2008
New Revision: 29693

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29693&view=rev
Log:
* allow replays to contain moves with identical source and destination

Modified:
    trunk/src/replay.cpp

Modified: trunk/src/replay.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/replay.cpp?rev=29693&r1=29692&r2=29693&view=diff
==============================================================================
--- trunk/src/replay.cpp (original)
+++ trunk/src/replay.cpp Fri Sep 26 17:10:25 2008
@@ -1056,6 +1056,11 @@
                        const gamemap::location src(*source, 
game_events::get_state_of_game());
                        const gamemap::location dst(*destination, 
game_events::get_state_of_game());
 
+                       if (src == dst) {
+                               WRN_REPLAY << "Warning: Move with identical 
source and destination. Skipping...";
+                               continue;
+                       }
+
                        unit_map::iterator u = units.find(dst);
                        if(u != units.end()) {
                                std::stringstream errbuf;


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to