[Freeciv-Dev] Re: core file on civserver, http://civserver.freeciv.org/g
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
freeciv-dev@xxxxxxxxxxx |
Subject: |
[Freeciv-Dev] Re: core file on civserver, http://civserver.freeciv.org/games/44610 |
From: |
"Per I. Mathisen" <per@xxxxxxxxxxx> |
Date: |
Thu, 24 Oct 2002 22:02:53 +0000 (GMT) |
On Thu, 24 Oct 2002, Raimar Falke wrote:
> > The assert came from here:
> >
> > is_real = MAPSTEP(x, y, punit->x, punit->y, dir);
> > assert(is_real);
> >
> > as is_real=0, where x=27, y=35, punit->x=27, punit->y=34, dir=0,
>
> This is expected if map.ysize=35. However the step from (27,34) to
> (27,35) isn't correct for this direction dir=0=DIR8_NORTHWEST.
>
> So can you please give map.xsize and map.ysize?
You are correct: map.xsize = 50, map.ysize = 35
It is a transport on its way to (23, 32) under AI control. Why did it go
to (27,35)?
Other variables set inside the do loop:
last_tile = FALSE;
waypoint_x = 23
waypoint_y = 32
penemy = NULL
punit->moves_left = 3
dest_x = 23
dest_y = 32
success is undefined
It was called from unittols.c:
if (activity==ACTIVITY_GOTO) {
if (!punit->ai.control && (!is_military_unit(punit) ||
punit->ai.passenger != 0 || !pplayer->ai.control)) {
/* autosettlers otherwise waste time; idling them breaks assignment */
/* Stalling infantry on GOTO so I can see where they're GOing TO. -- Syela
*/
(void) do_unit_goto(punit, GOTO_MOVE_ANY, TRUE);
}
return;
}
This piece of code is kind of hairy, but I still don't know why it should
bug. The goto destination seems ok.
- Per
|
|