Author: esr
Date: Thu Oct 23 06:39:20 2008
New Revision: 30327
URL: http://svn.gna.org/viewcvs/wesnoth?rev=30327&view=rev
Log:
Make a non-fatal error nonfatal.
Modified:
trunk/src/ai.cpp
Modified: trunk/src/ai.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai.cpp?rev=30327&r1=30326&r2=30327&view=diff
==============================================================================
--- trunk/src/ai.cpp (original)
+++ trunk/src/ai.cpp Thu Oct 23 06:39:20 2008
@@ -543,7 +543,8 @@
}
if(rt != p.routes.end()) {
-
assert(static_cast<size_t>(u_it->second.movement_left()) >=
rt->second.steps.size() && "Trying to move unit without enough move points
left\n");
+ if (static_cast<size_t>(u_it->second.movement_left())
>= rt->second.steps.size())
+ LOG_AI<<"Trying to move unit without enough
move points left\n";
u_it->second.set_movement(rt->second.move_left);
std::vector<location> steps = rt->second.steps;
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits