mail[Wesnoth-commits] r33396 - /trunk/src/actions.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by alinktomine on March 07, 2009 - 22:19:
Author: alink
Date: Sat Mar  7 22:19:44 2009
New Revision: 33396

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33396&view=rev
Log:
we call actions.cpp::move_unit with data coming from more various places
(replay since 1.5.10, and now AI via replay). So, add some checking there
against dummy moves.

Modified:
    trunk/src/actions.cpp

Modified: trunk/src/actions.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/actions.cpp?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- trunk/src/actions.cpp (original)
+++ trunk/src/actions.cpp Sat Mar  7 22:19:44 2009
@@ -2167,6 +2167,10 @@
 {
        assert(route.empty() == false);
 
+       if (route.size() <= 2 && route.front() == route.back()) {
+               DBG_NG << "Ignore an unit trying to jump on its hex at " << 
route.front() << "\n";
+       }
+
        // Stop the user from issuing any commands while the unit is moving
        const events::command_disabler disable_commands;
 




Related Messages


Powered by MHonArc, Updated Sat Mar 07 22:40:39 2009