Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2004:
[Freeciv-Dev] Re: (PR#8955) aitools.c:821: ai_unit_move
Home

[Freeciv-Dev] Re: (PR#8955) aitools.c:821: ai_unit_move

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8955) aitools.c:821: ai_unit_move
From: "Per Inge Mathisen" <per@xxxxxxxxxxx>
Date: Fri, 11 Jun 2004 04:37:16 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8955 >

On Fri, 11 Jun 2004, Christian Knoke wrote:
> > civserver: aitools.c:821: ai_unit_move: Zusicherung
> »is_tiles_adjacent(punit->x, punit->y, x, y)« nicht erfüllt.
> Abgebrochen (core dumped)
>
> reproducible from attached savegame, start, login chris, turn done

Looks like a pf error to me. The path given to ai_unit_execute_path
contains the same coordinates as the unit's location. The attached patch
moves the assert higher up in the blame hierarchy.

  - Per

Index: ai/aitools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aitools.c,v
retrieving revision 1.108
diff -u -r1.108 aitools.c
--- ai/aitools.c        4 Jun 2004 15:25:13 -0000       1.108
+++ ai/aitools.c        11 Jun 2004 11:32:12 -0000
@@ -109,6 +109,8 @@
     int x = path->positions[i].x, y = path->positions[i].y;
     int id = punit->id;

+    assert(!same_pos(punit->x, punit->y, x, y));
+
     /* We use ai_unit_move() for everything but the last step
      * of the way so that we abort if unexpected opposition
      * shows up. Any enemy on the target tile is expected to

  - Per





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