[Freeciv-Dev] Re: attacking transport (PR#2025)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, 25 Sep 2002, Per I. Mathisen wrote:
> On Wed, 25 Sep 2002, Gregory Berkolaiko wrote:
> > You should have gone one step further though: can_unit_attack_tile is
> > called only twice and in both cases there is a defender readily computed.
> > Thus the right function to be called is actually
> > can_unit_attack_unit_at_tile in both cases, saves you calling
> > get_defender.And get_defender is not one of the fastest functions.
> >
> > I'll make the patch when I get back (in the evening).
>
> Just please remember that the result of get_defender() may be NULL.
I'll try :)
Patch attached.
G.
attack_unit.diff
Description: Text document
|
|