Author: sveinung
Date: Fri May 13 11:36:45 2016
New Revision: 32685

URL: http://svn.gna.org/viewcvs/freeciv?rev=32685&view=rev
Log:
protocol: specify when act prob is irrelevant.

Send the special action probability value ACTPROB_NA when no actprob should
exist.

See patch #7219

Modified:
    branches/S2_6/fc_version
    branches/S2_6/server/unithand.c

Modified: branches/S2_6/fc_version
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/fc_version?rev=32685&r1=32684&r2=32685&view=diff
==============================================================================
--- branches/S2_6/fc_version    (original)
+++ branches/S2_6/fc_version    Fri May 13 11:36:45 2016
@@ -55,7 +55,7 @@
 #   - Avoid adding a new mandatory capability to the development branch for
 #     as long as possible.  We want to maintain network compatibility with
 #     the stable branch for as long as possible.
-NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-2.6-2016.Apr.28"
+NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-2.6-2016.May.13"
 NETWORK_CAPSTRING_OPTIONAL=""
 
 FREECIV_DISTRIBUTOR=""

Modified: branches/S2_6/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/unithand.c?rev=32685&r1=32684&r2=32685&view=diff
==============================================================================
--- branches/S2_6/server/unithand.c     (original)
+++ branches/S2_6/server/unithand.c     Fri May 13 11:36:45 2016
@@ -791,7 +791,8 @@
   if (!target_tile || !actor_unit || !actor_player
       || actor_unit->owner != actor_player) {
     action_iterate(act) {
-      probabilities[act] = 0;
+      /* No probability can exist when the request is invalid. */
+      probabilities[act] = ACTPROB_NA;
     } action_iterate_end;
 
     dsend_packet_unit_actions(pc, actor_unit_id,
@@ -826,7 +827,7 @@
   action_iterate(act) {
     if (action_get_actor_kind(act) != AAK_UNIT) {
       /* Not relevant. */
-      probabilities[act] = ACTPROB_IMPOSSIBLE;
+      probabilities[act] = ACTPROB_NA;
       continue;
     }
 


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

Reply via email to