mail[Wesnoth-commits] r33722 - /trunk/src/ai_attack.cpp


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

Header


Content

Posted by dave on March 16, 2009 - 04:48:
Author: dave
Date: Mon Mar 16 04:48:23 2009
New Revision: 33722

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33722&view=rev
Log:
remove buggy AI optimization which sometimes removes legitimate attacks from 
consideration

Modified:
    trunk/src/ai_attack.cpp

Modified: trunk/src/ai_attack.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai_attack.cpp?rev=33722&r1=33721&r2=33722&view=diff
==============================================================================
--- trunk/src/ai_attack.cpp (original)
+++ trunk/src/ai_attack.cpp Mon Mar 16 04:48:23 2009
@@ -270,8 +270,11 @@
 
                        cur_analysis.analyze(map_, units_, teams_, state_, 
*this, dstsrc, srcdst, enemy_dstsrc, current_team().aggression());
 
-                       //Remove this short-circuiting logic for now.. --David
-                       
if(cur_analysis.rating(current_team().aggression(),*this) > rating_to_beat) {
+                       //This logic to sometimes not add the attack because 
it doesn't
+                       //rate high enough seems to remove attacks from 
consideration
+                       //that should not be removed, so it has been removed.
+                       //  -- David.
+//                     
if(cur_analysis.rating(current_team().aggression(),*this) > rating_to_beat) {
 
                                result.push_back(cur_analysis);
                                used_locations[cur_position] = true;
@@ -279,7 +282,7 @@
                                                   tiles,used_locations,
                                                   units,result,cur_analysis);
                                used_locations[cur_position] = false;
-                       }
+//                     }
 
                        cur_analysis.vulnerability -= best_vulnerability;
                        cur_analysis.support -= best_support;




Related Messages


Powered by MHonArc, Updated Mon Mar 16 09:40:23 2009