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 11:56:41 -0800
Reply-to: bugs@xxxxxxxxxxx

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

On 11/20/05, Vasco Alexandre da Silva Costa <vasco.costa@xxxxxxxxx> wrote:
> On 11/20/05, Vasco Alexandre da Silva Costa <vasco.costa@xxxxxxxxx> wrote:
> Now I notice those are *defender* units, not the attacker unit. Blech.
>
> Shouldn't the EFT_DEFEND_BONUS effects queries be passed the defender unit,
> rather than the attacking unit, like effects.c says? They are defender
> modifiers after
> all, no?

Bah, I looked at it again and what I said makes no sense. :-)

Barring passing dummy units to the EFT_DEFEND_BONUS query, or reverting that
piece, I have another quite evil idea...

We make yet another effects query function which gets passed a struct
unit_class pointer:
get_city_defense_bonus(defending_city, attacking_unit_class, effect_type).

You use it like this:
get_city_defense_bonus(pcity, UCL_LAND, EFT_DEFEND_BONUS)

The rest is a matter of creative coding...

We can worry about making unit effects better later...
I believe we did not think the problem right last time and a proper
fix will be complex
enough that it should be for post 2.1.

Is EFT_DEFEND_BONUS the only one with a problem here?





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