Author: sveinung Date: Wed Dec 10 13:55:36 2014 New Revision: 27229 URL: http://svn.gna.org/viewcvs/freeciv?rev=27229&view=rev Log: Client goto: Base tile behavior of actors on action hostility.
Don't give all actors the same tile behavior no matter if they can perform hostile acts or not. See patch #5510 Modified: trunk/client/goto.c Modified: trunk/client/goto.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/goto.c?rev=27229&r1=27228&r2=27229&view=diff ============================================================================== --- trunk/client/goto.c (original) +++ trunk/client/goto.c Wed Dec 10 13:55:36 2014 @@ -491,7 +491,8 @@ return TB_IGNORE; } } else if (is_non_allied_city_tile(ptile, param->owner)) { - /* UTYF_TRADE_ROUTE units can travel to, but not through, enemy cities. + /* Units that can establish a trade route, enter a market place or + * establish an embassy can travel to, but not through, enemy cities. * FIXME: UTYF_HELP_WONDER units cannot. */ return TB_DONT_LEAVE; } else if (is_non_allied_unit_tile(ptile, param->owner)) { @@ -794,10 +795,12 @@ fc_assert(parameter->omniscience == FALSE); parameter->get_EC = get_EC; - if (is_attack_unit(punit) || is_actor_unit(punit)) { + if (is_attack_unit(punit) + || (is_actor_unit(punit) + && utype_acts_hostile(unit_type(punit)))) { parameter->get_TB = get_TB_aggr; - } else if (unit_has_type_flag(punit, UTYF_TRADE_ROUTE) - || unit_has_type_flag(punit, UTYF_HELP_WONDER)) { + } else if (is_actor_unit(punit) + && !utype_acts_hostile(unit_type(punit))) { parameter->get_TB = get_TB_caravan; } else { parameter->get_TB = no_fights_or_unknown_goto; _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits