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]

Re: "Smart" movement


Keir Novik wrote:
> 
> On the subject of unit movement, I notice that units are reluctant to move
> into a destination cell which contains other units.  Giving an order to
> move to an adjacent cell does not show this behaviour, and I don't think
> cells along a units route are treated this way.

At first I thought "no way", but now after experimenting with a crowd of
armor on the steppes, I saw it - the unit won't take the last step into
its destination if somebody else is there.

So I go to look at task.c:do_move_to_task, and whaddya know, the code is
designed that way!  The move-to task will fail if the final destination
cell has a unit that cannot be attacked (if enemy) or entered.  Alas,
there is no comment explaining why, although there may be some bizarre
case where you really want the unit to wake up and make the player
decide explicitly what to do.  But I don't see why ordinary stacking
would need this, especially since the key decision might be whether to
enter another unit, and it always does that automatically now.

Stan

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