Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2000:
[Freeciv-Dev] Re: disband unit bug (PR#396)
Home

[Freeciv-Dev] Re: disband unit bug (PR#396)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: sroh7497@xxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: disband unit bug (PR#396)
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Mon, 19 Jun 2000 21:03:41 +1000 (EST)

Stepan Roh <sroh7497@xxxxxxxxxxxxxxxxxxxxx> wrote:

> In Jun 16 (before 18:00 CET) CVS there is a bug: when active unit is
> standing in the city and some units (not the active one) are disbanded in
> the city window by player and then the window is closed, the left bar with
> units on the same square as active unit (which is standing in that city)
> is not updated. I hope you understand :-)

Yes :-)

The fix for this is fairly simple -- essentially the climisc.c 
client_remove_unit() part of the patch below (but slightly changed
for rest of below).

But I was reminded of a related bug which has existed forever,
that the hp of the current unit icon does not get updated if you 
select another unit of the same type, so I did some fixes in 
update_unit_pix_label() for this.

Then I reworked much of update_unit_pix_label() because I didn't 
like it.  And then I realised it could be mostly gui-independent,
with the help of a few new low-level (gui-dep) functions, so I did
that, which required some decisions about which modules to put
things in -- not always clear, but I think ok.

Plus I made the "unit below" icons clickable in the Xaw client,
as is already the case in the Gtk+ client.

(Also changed a game_remove_unit() in packhand.c to client_remove_unit(),
maybe not strictly necessary but seems safer.)

-- David

Attachment: update_unit_pix2a.diff.gz
Description: GNU Zip compressed data


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