[Freeciv-Dev] (PR#12584) gtk2: add-first-after-buy misbehaviour
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12584 >
> [bhudson - Tue Mar 22 03:40:16 2005]:
>
> If I buy a building then add-first, the thing I bought gets duplicated
> on the worklist.
>
> There are two ways to fix this bug:
> - complain "can't change after buying this turn"
> - add-next instead
>
> I slightly prefer the latter.
This is unfortunately rather hard to fix since the operation (as sent to
the server) is not atomic. The client (in citydlg_common) changes the
build target, and changes the worklist. Then it sends the new build
target and the new worklist. The build-target change fails but the
worklist change succeeds.
To solve this the client needs to detect the error itself. This may
mean moving some code from cityhand/cityturn.c into common/city.c.
-jason
|
|