Author: cazfi
Date: Tue Dec 30 05:13:38 2014
New Revision: 27445

URL: http://svn.gna.org/viewcvs/freeciv?rev=27445&view=rev
Log:
Added debug log about what actions each unit type gets marked as able to do in 
the cache

See patch #5618

Modified:
    trunk/common/unittype.c

Modified: trunk/common/unittype.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/unittype.c?rev=27445&r1=27444&r2=27445&view=diff
==============================================================================
--- trunk/common/unittype.c     (original)
+++ trunk/common/unittype.c     Tue Dec 30 05:13:38 2014
@@ -291,12 +291,14 @@
   action_enablers_iterate(enabler) {
     if (requirement_fulfilled_by_unit_type(putype,
                                            &(enabler->actor_reqs))) {
-        BV_SET(unit_can_act_cache[enabler->action], utype_index(putype));
-        BV_SET(unit_can_act_cache[ACTION_ANY], utype_index(putype));
-        if (action_is_hostile(enabler->action)) {
-          BV_SET(unit_can_act_cache[ACTION_HOSTILE], utype_index(putype));
-        }
+      log_debug("act_cache: %s can %s",
+                utype_rule_name(putype), gen_action_name(enabler->action));
+      BV_SET(unit_can_act_cache[enabler->action], utype_index(putype));
+      BV_SET(unit_can_act_cache[ACTION_ANY], utype_index(putype));
+      if (action_is_hostile(enabler->action)) {
+        BV_SET(unit_can_act_cache[ACTION_HOSTILE], utype_index(putype));
       }
+    }
   } action_enablers_iterate_end;
 }
 


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to