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: bug in infantry building a base which is already started


>On Wed, 26 May 2004, Hans Ronne wrote:
>
>> A followup: the easiest way to fix the build code is of course to iterate
>> over units instead of unit views. Since that code is checking that the
>> builder and the target is on the same side, the latter will always be fully
>> visible to the builder, so there is really no point in using unit views
>> here.
>
>I had considered what you suggest. However, one cannot assume that
>all units in a cell are on the same side as the builder. And since
>this is a task, and not an action-handler, we should not be giving
>the task special knowledge about another side's units. If we ever
>get to the point where we have a true client-server architecture,
>we may regret making such assumptions.

Maybe, but then we would have to rewrite the entire kernel. There are many
cases like this (not only in the action code) where units are accessed
directly, if it is safe to do so. In this specific case, it doesn't matter
if we access real units since enemy units are ignored and information about
them therefore cannot leak back to the interface or the AI.

I agree that a pure view-based kernel code might have some advantages. But
we are a far way from there.

Hans



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