This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Major bug and what to do about it (long)


>Hans Ronne wrote:
>
>>> How is attacking a ghost unit any different than a miss?
>>
>> Because we are dealing with a failed task here, not a failed action. We
>> never get to the point where we attack the ghost unit.
>
>I disagree. There is (or should be) an attempted attack carried out on
>the ghost unit. As near as I can tell, an attempted attack could be
>framed in terms of an action (which may, in turn, invoke other actions).

I agree that there should be an attempt to attack the ghost unit, which
should be framed in terms of an action. That is my whole point. But this is
not how the code works. What happens is that the attempted attack never
occurs because check_fire_at_action returns false. This, I would emphasize,
happens before prep_fire_at_action is called, so the action is not even
scheduled, much less attempted.

The check_x_action functions are actually used in two completely different
ways. One is in execute_action, where they check if a scheduled but not yet
executed action will fail or not. But they are also used in the planning
and task execution code, to evaluate possible actions that the AI or the
human player is contemplating, but has not yet scheduled for execution. As
I see it, the latter is really an abuse of these functions, particularly if
they reference real units instead of unit views, as in the current case.

Hans







Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]