[Freeciv-Dev] Re: (PR#7381) client goto for ai-controlled players
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7381 >
On Thu, 5 Feb 2004, Jason Dorje Short wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7381 >
>
> If I do a client-side goto for an AI-controlled player, the client
> allows the goto to go through unknown territory and assumes that this is
> really fast. The result is nearly always a worthless goto.
I guess the reason is that the parameter is filled as if the player in
omniscient (AI players are). But the path finding is done in the
client which does not have the knowledge of the unknown land (not a
tautology in the context). I am surprised you don't get a crash.
The solution is to overwrite the onmiscience parameter by hand in
fill_client_goto_parameter.
Please try attached patch.
G.
? ttt.gz
Index: client/goto.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/goto.c,v
retrieving revision 1.67
diff -u -r1.67 goto.c
--- client/goto.c 2004/01/28 21:36:48 1.67
+++ client/goto.c 2004/02/06 17:03:05
@@ -387,6 +387,9 @@
parameter->start_x = punit->x;
parameter->start_y = punit->y;
+ /* Omniscience is always FALSE in the client */
+ parameter->omniscience = FALSE;
+
/* May be overwritten by the caller. */
parameter->moves_left_initially = punit->moves_left;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Re: (PR#7381) client goto for ai-controlled players,
Gregory Berkolaiko <=
|
|