Author: sveinung Date: Tue Jan 6 12:42:43 2015 New Revision: 27550 URL: http://svn.gna.org/viewcvs/freeciv?rev=27550&view=rev Log: A unit can do an action that has a unit actor.
Don't include actions that aren't performed by a unit when handle_unit_get_actions() is preparing a list of actions a unit can do. See patch #5666 Modified: trunk/server/unithand.c Modified: trunk/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=27550&r1=27549&r2=27550&view=diff ============================================================================== --- trunk/server/unithand.c (original) +++ trunk/server/unithand.c Tue Jan 6 12:42:43 2015 @@ -440,6 +440,12 @@ /* Set the probability for the actions. */ action_iterate(act) { + if (action_get_actor_kind(act) != AAK_UNIT) { + /* Not relevant. */ + probabilities[act] = ACTPROB_IMPOSSIBLE; + continue; + } + if (target_city && action_get_target_kind(act) == ATK_CITY) { probabilities[act] = action_prob_vs_city(actor_unit, act, target_city); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits