Author: sveinung Date: Fri Dec 12 05:09:01 2014 New Revision: 27261 URL: http://svn.gna.org/viewcvs/freeciv?rev=27261&view=rev Log: Auto attack: Don't treat an actor incapable of doing hostile actions like a spy.
Check if the unit type can do hostile actions in stead of if it can act. See bug #23049 Modified: trunk/server/unittools.c Modified: trunk/server/unittools.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unittools.c?rev=27261&r1=27260&r2=27261&view=diff ============================================================================== --- trunk/server/unittools.c (original) +++ trunk/server/unittools.c Fri Dec 12 05:09:01 2014 @@ -2931,7 +2931,7 @@ penemywin = unit_win_chance(penemy, punit_defender); if ((penemywin > 1.0 - punitwin - || is_actor_unit(punit) + || utype_acts_hostile(unit_type(punit)) || get_transporter_capacity(punit) > 0) && penemywin > threshold) { #ifdef REALLY_DEBUG_THIS _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits