This is the mail archive of the
xconq7@sourceware.org
mailing list for the Xconq project.
border_slide compensation problem
- From: "Ed Hurst-Frost" <edward at hurst-frost dot net>
- To: <xconq7 at sourceware dot org>
- Date: Sun, 18 Jun 2006 17:00:49 +0100
- Subject: border_slide compensation problem
Hello. Although I've known xconq for a very long time, I've only recently
started developing with it. This is my first posting to this list.
I'm hoping to start (yet another) xconq revival, but I'm not going to go
into too much detail right now, because I've got a long way to go and anyway
I'm not sure anyone's listening.
But to find out whether there is, I'll start by asking about a possible bug
that's been hampering me:
It's in move.c rev 1.55, line 401:
if ((dist == 2 && !border_slide_possible(u, ox, oy, x, y)) && dist >
u_move_range(u2)) return A_ANY_TOO_FAR;
If I understand correctly, this allows a border_slide to move a unit a
distance of 2 even if its move_range is only 1.
But I have units whose move_range is greater than 1, and this line stops
them moving.
Wouldn't it be better written:
if (dist > u_move_range(u2) + (border_slide_possible(u, ox, oy, x, y)?1:0))
return A_ANY_TOO_FAR;
This helps units with a move_range over 1, however it probably doesn't
compensate for multiple slides between ox,oy and x,y. But I don't feel I
understand border_slides enough yet to fix it completely.
Can anyone help?