Author: sveinung
Date: Wed Jul 27 15:32:30 2016
New Revision: 33338

URL: http://svn.gna.org/viewcvs/freeciv?rev=33338&view=rev
Log:
Act sel dlg: pop up on long move to target city.

A Caravan that is airlifted to a city where it can establish a trade route
should pop up an action selection dialog when the popup_actor_arrival client
setting is enabled.

Reported by Frank <dunnoob>

See bug #24876

Modified:
    branches/S2_6/server/unittools.c

Modified: branches/S2_6/server/unittools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/unittools.c?rev=33338&r1=33337&r2=33338&view=diff
==============================================================================
--- branches/S2_6/server/unittools.c    (original)
+++ branches/S2_6/server/unittools.c    Wed Jul 27 15:32:30 2016
@@ -3469,6 +3469,20 @@
   punit->action_decision_tile = NULL;
   punit->action_decision_want = ACT_DEC_NOTHING;
 
+  if (!adj
+      && action_tgt_city(punit, pdesttile)) {
+    /* The unit can perform an action to the city at the destination tile.
+     * A long distance move (like an airlift) doesn't ask what action to
+     * perform before moving. Ask now. */
+
+    punit->action_decision_want = ACT_DEC_PASSIVE;
+    punit->action_decision_tile = pdesttile;
+
+    /* Let the client know that this unit wants the player to decide
+     * what to do. */
+    send_unit_info(player_reply_dest(pplayer), punit);
+  }
+
   /* Claim ownership of fortress? */
   bowner = extra_owner(pdesttile);
   if ((bowner == NULL || pplayers_at_war(bowner, pplayer))


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to