Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2005:
[Freeciv-Dev] (PR#13187) remove server goto
Home

[Freeciv-Dev] (PR#13187) remove server goto

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13187) remove server goto
From: "Jason Dorje Short" <jdorje@xxxxxxxxx>
Date: Sat, 28 May 2005 15:09:20 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13187 >

This patch removes client-side server goto entirely.  The one remaining
user is changed to use send_goto_tile.

It depends on PR#13186.

-jason

Index: client/civclient.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/civclient.c,v
retrieving revision 1.225
diff -u -r1.225 civclient.c
--- client/civclient.c  11 May 2005 19:31:37 -0000      1.225
+++ client/civclient.c  28 May 2005 22:07:40 -0000
@@ -435,15 +435,6 @@
 /**************************************************************************
 ...
 **************************************************************************/
-void send_goto_unit(struct unit *punit, struct tile *dest_tile)
-{
-  dsend_packet_unit_goto(&aconnection, punit->id,
-                        dest_tile->x, dest_tile->y);
-}
-
-/**************************************************************************
-...
-**************************************************************************/
 void send_report_request(enum report_type type)
 {
   dsend_packet_report_req(&aconnection, type);
Index: client/civclient.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/civclient.h,v
retrieving revision 1.39
diff -u -r1.39 civclient.h
--- client/civclient.h  12 Feb 2005 18:47:18 -0000      1.39
+++ client/civclient.h  28 May 2005 22:07:40 -0000
@@ -26,7 +26,6 @@
 
 void handle_packet_input(void *packet, int type);
 
-void send_goto_unit(struct unit *punit, struct tile *dest_tile);
 void send_report_request(enum report_type type);
 void send_attribute_block_request(void);
 void send_turn_done(void);
Index: client/control.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/control.c,v
retrieving revision 1.176
diff -u -r1.176 control.c
--- client/control.c    26 May 2005 04:55:18 -0000      1.176
+++ client/control.c    28 May 2005 22:07:41 -0000
@@ -909,7 +909,7 @@
                           dest_tile->x, dest_tile->y);
   } else {
     /* Initiate a "goto" with direction keys for exhausted units. */
-    send_goto_unit(punit, dest_tile);
+    send_goto_tile(punit, dest_tile);
   }
 }
 
Index: common/packets.def
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets.def,v
retrieving revision 1.128
diff -u -r1.128 packets.def
--- common/packets.def  22 May 2005 18:05:06 -0000      1.128
+++ common/packets.def  28 May 2005 22:07:43 -0000
@@ -764,12 +764,6 @@
   UNIT unit_id;
 end
 
-# used for server-side goto (air units only)
-PACKET_UNIT_GOTO=58;cs,dsend
-  UNIT unit_id;
-  COORD x, y;
-end
-
 # used for client orders: currently client-side goto and patrol
 PACKET_UNIT_ORDERS=59;cs
   UNIT unit_id;
Index: server/unithand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unithand.c,v
retrieving revision 1.337
diff -u -r1.337 unithand.c
--- server/unithand.c   7 May 2005 13:55:56 -0000       1.337
+++ server/unithand.c   28 May 2005 22:07:43 -0000
@@ -70,28 +70,6 @@
 /**************************************************************************
 ...
 **************************************************************************/
-void handle_unit_goto(struct player *pplayer, int unit_id, int x, int y)
-{
-  struct unit *punit = player_find_unit_by_id(pplayer, unit_id);
-  struct tile *ptile = map_pos_to_tile(x, y);
-
-  if (!ptile || !punit) {
-    return;
-  }
-
-  free_unit_orders(punit); /* This may reset punit->goto_tile also. */
-
-  punit->goto_tile = ptile;
-  set_unit_activity(punit, ACTIVITY_GOTO);
-
-  send_unit_info(NULL, punit);
-
-  (void) do_unit_goto(punit, GOTO_MOVE_ANY, TRUE);
-}
-
-/**************************************************************************
-...
-**************************************************************************/
 void handle_unit_airlift(struct player *pplayer, int unit_id, int city_id)
 {
   struct unit *punit = player_find_unit_by_id(pplayer, unit_id);

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13187) remove server goto, Jason Dorje Short <=