Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2005:
[Freeciv-Dev] (PR#13333) patch: selling and buying in the same turn
Home

[Freeciv-Dev] (PR#13333) patch: selling and buying in the same turn

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13333) patch: selling and buying in the same turn
From: "Benoit Hudson" <bh@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 25 Jun 2005 10:52:17 -0700
Reply-to: bugs@xxxxxxxxxxx

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

The server doesn't care, but the gtk-2 client doesn't allow you to both
sell an improvement in the same turn that you bought one.  This appears
to be a bug.  Tracking it down was easy: there's a check for
pcity->did_buy when it checks whether you can sell; but I decided to
dump all the logic for whether you can sell into the
can_city_sell_improvement function that already exists, instead of
spreading the check out all over each client and the server.

Also adds an assertion that was in a comment but not in the code (that
another player can't sell our building).

Only lightly tested.

Attachment: sell-and-buy.diff
Description: Binary data


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