Author: sveinung
Date: Wed Jul 20 15:40:01 2016
New Revision: 33282

URL: http://svn.gna.org/viewcvs/freeciv?rev=33282&view=rev
Log:
protocol: send action's actor and target kind.

Transfer the action's actor kind and target kind in PACKET_RULESET_ACTION.
This makes them available to clients that don't use Freeciv's C code.

See patch #7478

Modified:
    trunk/client/packhand.c
    trunk/common/networking/packets.def
    trunk/fc_version
    trunk/server/ruleset.c

Modified: trunk/client/packhand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/packhand.c?rev=33282&r1=33281&r2=33282&view=diff
==============================================================================
--- trunk/client/packhand.c     (original)
+++ trunk/client/packhand.c     Wed Jul 20 15:40:01 2016
@@ -3951,6 +3951,9 @@
 
   sz_strlcpy(act->ui_name, p->ui_name);
   act->quiet = p->quiet;
+
+  act->actor_kind  = p->act_kind;
+  act->target_kind = p->tgt_kind;
 
   act->min_distance = p->min_distance;
   act->max_distance = p->max_distance;

Modified: trunk/common/networking/packets.def
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/networking/packets.def?rev=33282&r1=33281&r2=33282&view=diff
==============================================================================
--- trunk/common/networking/packets.def (original)
+++ trunk/common/networking/packets.def Wed Jul 20 15:40:01 2016
@@ -249,6 +249,8 @@
 type GEN_ACTION         = uint8(enum gen_action)
 type ACTION_AUTO_CAUSE  = uint8(enum action_auto_perf_cause)
 type ACTION_DECISION    = uint8(enum action_decision)
+type ACTOR_KIND         = uint8(enum action_actor_kind)
+type TARGET_KIND        = uint8(enum action_target_kind)
 type UNIT_DATA_TYPE     = uint8(enum unit_ss_data_type)
 type REVOLENTYPE        = uint8(enum revolen_type)
 type HAPPYBORDERSTYPE   = uint8(enum happyborders_type)
@@ -1724,6 +1726,9 @@
   STRING ui_name[MAX_LEN_NAME];
   BOOL   quiet;
 
+  ACTOR_KIND  act_kind;
+  TARGET_KIND tgt_kind;
+
   SINT32 min_distance;
   SINT32 max_distance;
   BV_ACTIONS blocked_by;

Modified: trunk/fc_version
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=33282&r1=33281&r2=33282&view=diff
==============================================================================
--- trunk/fc_version    (original)
+++ trunk/fc_version    Wed Jul 20 15:40:01 2016
@@ -56,7 +56,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.Jul.18"
+NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.0-2016.Jul.20"
 NETWORK_CAPSTRING_OPTIONAL=""
 
 FREECIV_DISTRIBUTOR=""

Modified: trunk/server/ruleset.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/ruleset.c?rev=33282&r1=33281&r2=33282&view=diff
==============================================================================
--- trunk/server/ruleset.c      (original)
+++ trunk/server/ruleset.c      Wed Jul 20 15:40:01 2016
@@ -7193,6 +7193,9 @@
     sz_strlcpy(packet.ui_name, action_by_number(act)->ui_name);
     packet.quiet = action_by_number(act)->quiet;
 
+    packet.act_kind = action_by_number(act)->actor_kind;
+    packet.tgt_kind = action_by_number(act)->target_kind;
+
     packet.min_distance = action_by_number(act)->min_distance;
     packet.max_distance = action_by_number(act)->max_distance;
     packet.blocked_by = action_by_number(act)->blocked_by;


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

Reply via email to