Author: sveinung
Date: Fri May 13 11:36:01 2016
New Revision: 32684

URL: http://svn.gna.org/viewcvs/freeciv?rev=32684&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:
    trunk/fc_version
    trunk/server/unithand.c

Modified: trunk/fc_version
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=32684&r1=32683&r2=32684&view=diff
==============================================================================
--- trunk/fc_version    (original)
+++ trunk/fc_version    Fri May 13 11:36:01 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-3.0-2016.May.11"
+NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.0-2016.May.13"
 NETWORK_CAPSTRING_OPTIONAL=""
 
 FREECIV_DISTRIBUTOR=""

Modified: trunk/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=32684&r1=32683&r2=32684&view=diff
==============================================================================
--- trunk/server/unithand.c     (original)
+++ trunk/server/unithand.c     Fri May 13 11:36:01 2016
@@ -1131,7 +1131,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,
@@ -1166,7 +1167,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