Author: sveinung
Date: Wed Mar 15 12:32:37 2017
New Revision: 35117
URL: http://svn.gna.org/viewcvs/freeciv?rev=35117&view=rev
Log:
Clarify "no action" in client side auto act.
See hrm Feature #644616
Modified:
branches/S3_0/client/packhand.c
Modified: branches/S3_0/client/packhand.c
URL:
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/packhand.c?rev=35117&r1=35116&r2=35117&view=diff
==============================================================================
--- branches/S3_0/client/packhand.c (original)
+++ branches/S3_0/client/packhand.c Wed Mar 15 12:32:37 2017
@@ -4481,7 +4481,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])) {
@@ -4495,12 +4495,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:
@@ -4530,7 +4530,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);
@@ -4579,14 +4579,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