From: Eric McDonald <mcdonald@phy.cmich.edu>
To: Jim Kingdon <kingdon@panix.com>
Cc: xconq7@sources.redhat.com, <sampln@sbcglobal.net>
Subject: Re: annoying new bug in movement
Date: Sun, 21 Dec 2003 13:16:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.44.0312210153320.24091-100000@leon.phy.cmich.edu> (raw)
In-Reply-To: <200312040634.hB46Y0v27711@panix5.panix.com>
Hi Jim, Lincoln, others,
On Thu, 4 Dec 2003, Jim Kingdon wrote:
> wanted to go. This is fairly new, probably with the new path code.
Yes.
Two things:
(1) check_move_action does not check for all the same things as
do_move_action expects.
(2) do_move_action underwent a significant revision with a patch
Peter provided on Nov 18. I checked in the patch more recently
(Nov 29). In particular, the trouble seems to come from this part:
- } else if (dist == 1
- || (dist == 2 && border_slide_possible(u2, ox, oy,
x, y))) {
+ } else if((dir = choose_move_direction(unit2, x, y, 0,
CMD_NONE)) >= 0) {
This changed what sort of things fell through to the "else"
branch. Of course, there was no "else" branch; flow simply
returned to the trunk of the function, which had:
if (alive(unit)) {
acpcost = max(acpcost, u_acp_to_move(u2));
if (acpcost < 1)
acpcost = 1;
use_up_acp(unit, acpcost);
}
so that ACP was being deducted whether or not the unit was
actually being moved.
> By "fails" I mean that the ACP now shows "0/1" but the infantry hasn't
> gone anywhere. It doesn't even go into reserve mode, which I could
> recover from.
I have put in an "else" branch to catch anything that falls
through. It does not correctly address all the possibilities;
choose_move_direction() and the stuff inside its branch must
likely be improved to address them properly.
But at least now a notification is provided to let the player know
that the movement cannot be performed, and ACP is prevented from
being deducted in such a circumstance.
Maybe you could give things a try now.
Thanks,
Eric
next prev parent reply other threads:[~2003-12-21 7:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-05 1:33 Jim Kingdon
2003-12-06 1:34 ` Hans Ronne
2003-12-21 13:16 ` Eric McDonald [this message]
2003-12-23 4:40 ` Lincoln Peters
2003-12-23 4:54 ` Eric McDonald
2003-12-24 23:05 ` Lincoln Peters
2003-12-26 0:48 ` Eric McDonald
2003-12-26 2:06 ` Lincoln Peters
2003-12-31 19:10 ` Jim Kingdon
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=Pine.LNX.4.44.0312210153320.24091-100000@leon.phy.cmich.edu \
--to=mcdonald@phy.cmich.edu \
--cc=kingdon@panix.com \
--cc=sampln@sbcglobal.net \
--cc=xconq7@sources.redhat.com \
/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).