Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] Re: (PR#6428) done_moving and server-side goto
Home

[Freeciv-Dev] Re: (PR#6428) done_moving and server-side goto

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#6428) done_moving and server-side goto
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 7 Oct 2003 15:29:53 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Jason Short wrote:
> The new done_moving flag isn't properly set for pauses in server-side goto.

Patch attached.

> How do server-side goto pauses get handled at the client, anyway?

After looking at the code, I have no idea...

jason

Index: server/gotohand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/gotohand.c,v
retrieving revision 1.174
diff -u -r1.174 gotohand.c
--- server/gotohand.c   2003/09/17 14:59:40     1.174
+++ server/gotohand.c   2003/10/07 22:29:34
@@ -1304,7 +1304,9 @@
     if (find_air_first_destination(punit, &waypoint_x, &waypoint_y)) {
       /* this is a special case for air units who do not always want to move. 
*/
       if (same_pos(waypoint_x, waypoint_y, punit->x, punit->y)) {
-       return GR_OUT_OF_MOVEPOINTS; /* out of fuel */
+       punit->done_moving = TRUE;
+       send_unit_info(NULL, punit);
+       return GR_WAITING; /* out of fuel */
       }
     } else {
       freelog(LOG_VERBOSE, "Did not find an airroute for "
Index: server/gotohand.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/gotohand.h,v
retrieving revision 1.28
diff -u -r1.28 gotohand.h
--- server/gotohand.h   2003/10/07 18:55:09     1.28
+++ server/gotohand.h   2003/10/07 22:29:34
@@ -23,7 +23,7 @@
 enum goto_result {
   GR_DIED,               /* pretty obvious that */ 
   GR_ARRIVED,            /* arrived to the destination */
-  GR_OUT_OF_MOVEPOINTS,  /* either no moves left or plane refueling */ 
+  GR_OUT_OF_MOVEPOINTS,  /* no moves left */ 
   GR_WAITING,            /* waiting due to danger, has moves */
   GR_FOUGHT,             /* was stopped due to fighting, has moves */
   GR_FAILED              /* failed for some other reason, has moves */

[Prev in Thread] Current Thread [Next in Thread]