Author: sveinung
Date: Wed Mar 15 12:30:24 2017
New Revision: 35115
URL: http://svn.gna.org/viewcvs/freeciv?rev=35115&view=rev
Log:
Clarify "no action" in client side auto act.
See hrm Feature #644616
Modified:
trunk/client/packhand.c
Modified: trunk/client/packhand.c
URL:
http://svn.gna.org/viewcvs/freeciv/trunk/client/packhand.c?rev=35115&r1=35114&r2=35115&view=diff
==============================================================================
--- trunk/client/packhand.c (original)
+++ trunk/client/packhand.c Wed Mar 15 12:30:24 2017
@@ -4482,7 +4482,7 @@
**************************************************************************/
static enum gen_action auto_attack_act(const struct act_prob *act_probs)
{
- enum gen_action attack_action = ACTION_COUNT;
+ enum gen_action attack_action = ACTION_NONE;
action_iterate(act) {
if (action_prob_possible(act_probs[act])) {
@@ -4496,12 +4496,12 @@
case ACTION_ATTACK:
case ACTION_CONQUER_CITY:
/* An attack. */
- if (attack_action == ACTION_COUNT) {
+ if (attack_action == ACTION_NONE) {
/* No previous attack action found. */
attack_action = act;
} else {
/* More than one legal attack action found. */
- return ACTION_COUNT;
+ return ACTION_NONE;
}
break;
case ACTION_ESTABLISH_EMBASSY:
@@ -4531,7 +4531,7 @@
case ACTION_AIRLIFT:
case ACTION_HEAL_UNIT:
/* An interesting non attack action has been found. */
- return ACTION_COUNT;
+ return ACTION_NONE;
break;
case ACTION_COUNT:
fc_assert(act != ACTION_COUNT);
@@ -4580,14 +4580,14 @@
if (gui_options.popup_attack_actions) {
/* Pop up the action selection dialog no matter what. */
- auto_action = ACTION_COUNT;
+ auto_action = ACTION_NONE;
} else {
/* Pop up the action selection dialog unless the only interesting
* action the unit may be able to do is an attack action. */
auto_action = auto_attack_act(act_probs);
}
- if (auto_action != ACTION_COUNT) {
+ if (auto_action != ACTION_NONE) {
/* No interesting actions except a single attack action has been
* found. The player wants it performed without questions. */
_______________________________________________
Freeciv-commits mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-commits