Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2005:
[Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem)
Home

[Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx, per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem)
From: "Vasco Alexandre da Silva Costa" <vasco.costa@xxxxxxxxx>
Date: Sun, 20 Nov 2005 10:33:23 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14443 >

On 11/18/05, Jason Short <jdorje@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> > > City Walls are not visible in the city icon, for at least trident
> non-iso.
>
> > This is because city_got_citywalls() always returns FALSE.
> > get_city_bonus(pcity, EFT_LAND_DEFEND) is always 0, because the effect's
> > requierements need also unit class.
>
> This is an obnoxious problem.  Basically the issue is that (and this has
> always been the case, but it is aggravated by the more generalized
> effect types) you cannot query an effect type via get_xxx_bonus()
> without using the /canonical/ get_xxx_bonus function.  In this
> particular case you cannot use get_city_bonus to query citywalls, you
> have to use get_unit_city_bonus, and this is impossible inside
> city_got_citywalls because there is no unit.  The problem probably also
> affects the AI in various places (probably not limited to the new effect
> types).

If you look at the places which use city_got_citywalls inside advmilitary.c,
in one you have a unit pointer, and in the other you have a unit type pointer.
Can't we just use those?





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