Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2003:
[Freeciv-Dev] (PR#4620) Re: (PR#4260) assertion in get_defender
Home

[Freeciv-Dev] (PR#4620) Re: (PR#4260) assertion in get_defender

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: kaufman@xxxxxxxxxxxxxxxxxxxxxx, jdorje@xxxxxxxxxxxxxxxxxxxxx, ChrisK@xxxxxxxx, kenn@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#4620) Re: (PR#4260) assertion in get_defender
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Fri, 15 Aug 2003 09:19:04 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Fri, 15 Aug 2003, Jason Short wrote:
> > > The battleship is attacking a transport.The transport's tile
> > > contains a second unit - the Mech. Inf. from an allied player that
> > > is being transported_by the transport.
> >
> > Oh, and...
> >
> > The battleship's owner (player 0) is in DS_ALLIANCE withthe
> > transport's owner (player 4), but has DS_NO_CONTACT with the Mech
> > Inf's owner (player 18).
>
> So, obviously the immediate problem is that the transport cannot be
> attacked (it's allied). The Mech Inf can be attacked, but cannot defend
> here(we're on ocean). Thus count==1 but bestdef==NULL.  The code to
> catch this error may or may not be overzealous.

common/combat.c
586     count++;
587     if (unit_can_defend_here(defender)) {

Swap the two lines above. End of problem.

  - Per




[Prev in Thread] Current Thread [Next in Thread]