[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]
<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?
- [Freeciv-Dev] Re: (PR#14628) City walls gone, Jason Short, 2005/11/17
- [Freeciv-Dev] (PR#14443) city walls not visible (effects problem), Jason Short, 2005/11/18
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Per I. Mathisen, 2005/11/19
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Jason Short, 2005/11/19
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Vasco Alexandre da Silva Costa, 2005/11/20
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem),
Vasco Alexandre da Silva Costa <=
- [Freeciv-Dev] (PR#14443) city walls not visible (effects problem), Vasco Alexandre da Silva Costa, 2005/11/20
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Vasco Alexandre da Silva Costa, 2005/11/20
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Vasco Alexandre da Silva Costa, 2005/11/20
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Jason Short, 2005/11/20
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Jason Short, 2005/11/20
- [Freeciv-Dev] (PR#14443) effects queries give useless results when not passed appropriate parameters, Jason Short, 2005/11/21
|
|