[Freeciv-Dev] Re: CMA passes back control without reason (PR#1505)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, Jun 04, 2002 at 01:32:11PM +0200, Raimar Falke wrote:
This is a general reply to this thread based on new information.
There is code for a goto agent. It gets a path and a unit and moves
the unit according to the path description. This may take multiple
turns. The past implementation was as follow:
search for the current position in the path
execute the next step
However this fails if a given position is "used" multiple times. So I
had to add a counter how many steps the unit already gone:
get current pos from path using counter
make sure that the unit is at this position
execute the next step
is successful:
increase counter
save counter
And this "save counter" is the problem. You have to synchronize the
unit movements with the counter since you have no chance to correlate
them later without the counter. So even the current scheme (where the
counter is saved at the end of turn) is bad and can fail. IMHO we have
to change the code to flush the attributes after every set
operation. This still leave a small time window where the client can
crash/disconnect but this should be really be small.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
Windows: Where do you want to go today?
Linux: Where do you want to go tomorrow?
BSD: Are you guys coming or what?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Re: CMA passes back control without reason (PR#1505),
Raimar Falke <=
|
|