public inbox for xconq7@sourceware.org
 help / color / mirror / Atom feed
From: "Ed Hurst-Frost" <edward@hurst-frost.net>
To: <xconq7@sourceware.org>
Subject: border_slide compensation problem
Date: Sun, 18 Jun 2006 16:01:00 -0000	[thread overview]
Message-ID: <006201c692f0$5e0c2b60$0e01a8c0@hurstfrost.net> (raw)

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? 

             reply	other threads:[~2006-06-18 16:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-18 16:01 Ed Hurst-Frost [this message]
2006-06-18 17:14 ` Lincoln Peters

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='006201c692f0$5e0c2b60$0e01a8c0@hurstfrost.net' \
    --to=edward@hurst-frost.net \
    --cc=xconq7@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).