[Freeciv-Dev] Re: [Patch] Introduction of turns
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, Aug 24, 2001 at 01:06:56AM +0200, Reinier Post wrote:
> On Sat, Aug 11, 2001 at 12:26:35PM +0200, Raimar Falke wrote:
> >
> > For client side ai and maybe also for other things the definition of
> > the current turn is needed.
>
> I don't understand - send_year_to_clients() already happens.
The client have to know it is now in turn 0 (==-4000) or in turn 84
(==375). If some code plan like "it will take 4 turns to reach the
position and 3 turns to construct a railroad and we started in turn 40
and have turn 46 the settler must be finished" it can assert that in
turn 46 the settler really is finished. If the settler is still
working there is a bug somewhere.
The current agent code store a plan like above to know what to do.
Yes the client can increase the turn every time it gets a new year
packet from the server. However how does the server knows the current
turn after a savegame is loaded and how will the server tell this the
client.
> > The attached patch adds this. It is
> > straightforward except this piece:
>
> [...]
>
> > IMHO the unit_info packets which are caused by reseting the move
> > points should happen in the new year.
>
> I don't think so - the movement is lost in the old turn.
> Why do you need this?
Situation:
- turn n
- server get turn done and performs turn transition
- during this the server sends new unit info messages which indicate
that the units have full move points
- client thinks how cool I can still move this unit
- however this trigger an assert since the unit gets to its goal
before the plan
- server sends (n+1)
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"On the eigth day, God started debugging"
[Freeciv-Dev] Re: [Patch] Introduction of turns, Raimar Falke, 2001/08/27
[Freeciv-Dev] Re: [Patch] Introduction of turns, Ross W. Wetmore, 2001/08/27
|
|