Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2003:
[Freeciv-Dev] Re: (PR#4278) goto.c 1.49

[Freeciv-Dev] Re: (PR#4278) goto.c 1.49

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rt-guest@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4278) goto.c 1.49
From: "Raimar Falke" <rf13@xxxxxxxxxxxxxxxxx>
Date: Thu, 22 May 2003 06:49:29 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Wed, May 21, 2003 at 07:28:10AM -0700, Cameron Morland wrote:
> Hash: SHA1
> On Wed, May 21, 2003 at 06:34:36AM -0700, Guest wrote:
> > The log says, that this revision is almost fully rewritten.
> > Now with my tireme when I want to move away from the coast with goto, I
> > receive a Segmentation fault. When I move the tireme by hand with
> > direction buttons it works.
> > I receive the same result when at the beginning I say goto to my
> > settlers, and push my mouse on e.g. sea. The second time gives segfault.
> Similarly, if you are driving a boat, such as an ironclad, and you try
> to goto a land unit on land (eg a cannon sitting on the plains),
> because you want to attack it and are too lazy to drive by hand, the
> client segfaults. 

Do you have a savegame which shows this?

> And the goto code tries to drive through enemy cities, which doesn't
> make any sense.

This is easy to change. See the attached patch. The patch compiles but
is untested.


 email: rf13@xxxxxxxxxxxxxxxxx
 "SIGDANGER - The System is likely to crash soon"

Index: client/goto.c
RCS file: /home/freeciv/CVS/freeciv/client/goto.c,v
retrieving revision 1.49
diff -u -u -r1.49 goto.c
--- client/goto.c       2003/05/15 12:38:11     1.49
+++ client/goto.c       2003/05/22 13:48:32
@@ -321,7 +321,10 @@
 static enum tile_behavior get_TB(int x, int y, enum known_type known,
                                 struct pf_parameter *param)
-  if (known == TILE_UNKNOWN) {
+  if (known == TILE_UNKNOWN
+      || (map_get_city(x, y)
+         && pplayers_at_war(param->owner,
+                            city_owner(map_get_city(x, y))))) {
     return TB_IGNORE;
   return TB_NORMAL;

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