mail[Wesnoth-commits] r33930 - /trunk/src/formula_ai.cpp


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

Header


Content

Posted by jeremy . rosen on March 20, 2009 - 18:57:
Author: boucman
Date: Fri Mar 20 18:57:25 2009
New Revision: 33930

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33930&view=rev
Log:
fix off-by-one mistake in formula_ai logs for some (but not all) logging, 
sugestion by Crab_

Modified:
    trunk/src/formula_ai.cpp

Modified: trunk/src/formula_ai.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/formula_ai.cpp?rev=33930&r1=33929&r2=33930&view=diff
==============================================================================
--- trunk/src/formula_ai.cpp (original)
+++ trunk/src/formula_ai.cpp Fri Mar 20 18:57:25 2009
@@ -1918,7 +1918,7 @@
                                                 throw 
formula_error("Incorrect result of calling the move() formula", "", "", 0);
                                         }
                                         
-                                        LOG_AI << "MOVE: " << move->src().x 
<< "," << move->src().y << " -> " << move->dst().x << "," << move->dst().y << 
"\n";
+                                        LOG_AI << "MOVE: " << 
move->src().x+1 << "," << move->src().y+1 << " -> " << move->dst().x+1 << "," 
<< move->dst().y+1 << "\n";
                                         made_move = true;
                                         
                                     } else {
@@ -1933,7 +1933,7 @@
                                 map_location destination = 
path_calculator(move_partial->src(), move_partial->dst(), unit_it);
 
                                 if( destination != map_location()) {
-                                    LOG_AI << "MOVE PARTIAL: " << 
move_partial->src().x << "," << move_partial->src().y << " -> " << 
move_partial->dst().x << "," << move_partial->dst().y << "\n";
+                                    LOG_AI << "MOVE PARTIAL: " << 
move_partial->src().x+1 << "," << move_partial->src().y+1 << " -> " << 
move_partial->dst().x+1 << "," << move_partial->dst().y+1 << "\n";
                                     move_unit_partial(move_partial->src(), 
destination, possible_moves_);
                                     made_move = true;
                                 } else
@@ -1961,7 +1961,7 @@
                                 continue;
                             }
 
-                            LOG_AI << "MOVE: " << attack->move_from().x << 
"," << attack->move_from().y << " -> " << attack->src().x << "," << 
attack->src().y << "\n";
+                            LOG_AI << "MOVE: " << attack->move_from().x+1 << 
"," << attack->move_from().y+1 << " -> " << attack->src().x+1 << "," << 
attack->src().y+1 << "\n";
                             move_unit(attack->move_from(), attack->src(), 
possible_moves_);
                         }
 




Related Messages


Powered by MHonArc, Updated Fri Mar 20 19:40:30 2009