mail[Wesnoth-commits] r33693 - in /trunk: changelog src/team.cpp


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

Header


Content

Posted by joerg . hinrichs on March 15, 2009 - 18:46:
Author: jhinrichs
Date: Sun Mar 15 18:46:14 2009
New Revision: 33693

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33693&view=rev
Log:
Fixes bug #13165 (AI leader behaving too aggressive)

Modified:
    trunk/changelog
    trunk/src/team.cpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=33693&r1=33692&r2=33693&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sun Mar 15 18:46:14 2009
@@ -25,6 +25,7 @@
    * Started with a new layout engine for the new widgets (bug #13180)
  * Miscellaneous and bug fixes:
    * Fix another campaign replay bug (#13139)
+   * Fix AI bug #13165 (leader too aggressive)
    * Fix WML [advancefrom] bug (#13176)
    * It is now possible to create units with random genders in debug mode
    * Reduce the fontconfig dependency to 2.4.1

Modified: trunk/src/team.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/team.cpp?rev=33693&r1=33692&r2=33693&view=diff
==============================================================================
--- trunk/src/team.cpp (original)
+++ trunk/src/team.cpp Sun Mar 15 18:46:14 2009
@@ -19,6 +19,7 @@
 
 #include "global.hpp"
 
+#include "foreach.hpp"
 #include "game_events.hpp"
 #include "gamestatus.hpp"
 #include "log.hpp"
@@ -568,7 +569,12 @@
        if (info_.average_price)
                return info_.average_price;
 
-       std::for_each(info_.can_recruit.begin(), info_.can_recruit.end(), 
count_average(info_.average_price));
+       {
+               count_average avg(info_.average_price);
+               BOOST_FOREACH(std::string type, info_.can_recruit){
+                       avg(type);
+               }
+       }
        return info_.average_price;
 }
 




Related Messages


Powered by MHonArc, Updated Sun Mar 15 19:20:30 2009