[Freeciv-Dev] (PR#13167) Patrol command broken in 2.0.0 server?
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13167 >
> [perle@xxxxxxxxxxxxxxx - Mon May 23 17:58:29 2005]:
> today I wanted to send a diplomat patrolling two fortifications which
> were connected with a railway (with the q command), as I did so often
> in earlier versions. After that, I could not give any commands to
> any other unit. The process list (top) did show the server being busy
> calculating. I guess that for some reason, the loop wasn't cut at the
> starting point. Fortunately, there was a savefile from the beginning
> of the turn, so I could retrace my steps, saved immediately before
> giving the command to the diplomat, and voila, reproducible.
Thanks for the report. Indeed there is a bug here. This patch should
fix it.
-jason
Index: server/unittools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unittools.c,v
retrieving revision 1.306.2.12
diff -u -r1.306.2.12 unittools.c
--- server/unittools.c 3 May 2005 03:21:36 -0000 1.306.2.12
+++ server/unittools.c 25 May 2005 04:30:30 -0000
@@ -2963,8 +2963,11 @@
if (moves_made == punit->orders.length) {
/* For repeating orders, don't repeat more than once per turn. */
freelog(LOG_DEBUG, " stopping because we ran a round");
+ punit->done_moving = TRUE;
+ send_unit_info(NULL, punit);
return TRUE;
}
+ moves_made++;
last_order = (!punit->orders.repeat
&& punit->orders.index + 1 == punit->orders.length);
|
|