This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
Re: bug in infantry building a base which is already started
- From: Eric McDonald <mcdonald at phy dot cmich dot edu>
- To: Jim Kingdon <kingdon at panix dot com>
- Cc: xconq7 at sources dot redhat dot com
- Date: Mon, 24 May 2004 21:31:43 -0600
- Subject: Re: bug in infantry building a base which is already started
- References: <200405240345.i4O3jCG21447@panix5.panix.com>
On Sun, 2004-05-23 at 21:45, Jim Kingdon wrote:
> In the standard game, have an infantry start building a base. So far
> so good. Then put a second infantry in the base, and have it build a
> base in the same location. The correct behavior is for both infantry
> to work together on building the same base (well, at least this is the
> traditional behavior). The buggy behavior is that the build command
> seemed to work, but nothing happens (the base doesn't get further
> built, and the infantry doesn't expend an ACP).
Well, for once, the report didn't actually lead to a problem in the
create/build code. The 'for_all_view_stack_with_occs' macro does not
consider the incomplete base for some reason, when it is going through
the unit views in the cell. Instead it finds both the infantry, and, of
course, they are not interested in building one another. And so the task
fails silently.
This raises an issue of whether side notification messages should be
generated by tasks or not. The UI and the various impl_* functions are
not omnipotent, and it might be wiser to report failures at the points
of failure instead of trying to guess them (as the UI does).
But the notification issue and the apparent bug in the unit view macro
aside, I believe I have fixed the bug that you reported. I just swapped
the 'for_all_view_stack_with_occs' with 'for_all_view_stack'. The only
reason I used the former to begin with was to handle the case where a
builder might want to work on another unit's occs.
Eric