Re: [Freeciv-Dev] Bug in savegame loading?
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 11 Mar 1999, David Pfitzner wrote:
> David Pfitzner wrote:
> > I'm not sure whether unitfunc.c:diplomat_bribe() should
> > call unit_bribe_cost() to get an up-to-date value and in case
> > the client didn't do the right things above. The reason possibly
> > not is that then the client may spend a different amount that the
> > player clicked 'ok' to...
>
> Possibly compare the old value (in the unit struct) to
> a newly calculated value, and re-send a PACKET_INCITE_COST
> if different (to popup a new confirmation with the new
> cost).
That would be annoying. Each time a player spends some money, the bribe cost
changes. Imagine a lagged player trying to bribe a unit when the enemy keeps
buying things for his cities. You might have to try 5 or 6 times. Why not
just say that the cost is calculated when the player attempts to bribe the
units or city, and that it is good until the player says yes or no? Before I
added the bit with PACKET_INCITE_INQ the bribe cost was sent to the client
with every unit update, however the server only calculated it at the beginning
of the turn. So if you took the enemy capital, his units wouldn't get any
cheaper.
|
|