This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
Re: transport and the bug + fixed
- From: Hans Ronne <hronne at comhem dot se>
- To: Peter Garrone <pgarrone at acay dot com dot au>
- Cc: xconq7 at sources dot redhat dot com
- Date: Thu, 4 Dec 2003 01:21:20 +0100
- Subject: Re: transport and the bug + fixed
- References: <l03130300bbf4024592fd@[212.181.162.155]><Pine.LNX.4.44.0312012235490.3913-100000@leon.phy.cmich.edu><20031201094951.GB812@leonardo><Pine.LNX.4.44.0312012235490.3913-100000@leon.phy.cmich.edu><l03130300bbf4024592fd@[212.181.162.155]>
> With respect to the desynch bug, one obvious possibility did occur to me.
>If the
> pathfinding is invoked from the mplayer or ai code, then the found path
> is cached in the local process, but not in other processes. Then when
> the non-local process has to find a direction, it will usually find the
> same path, but there is a possibility that conditions have changed and
> a different path could be
> found and cached, causing differences down the track. So this should
> possibly give you a line of attack on the problem.
This was indeed the case! I nuked the cahce code and the desynch bug went
away. Further experiments showed that nuking get_dir_from_cache is all that
is required. path_get_next_cached_move and path_get_next_cached_node do not
contribute to the desync. Which is good, because taking out these functions
as well has a huge impact on performance.
The bad news is that no transports or bombers are ever built. I thought
previously that this was a consequence of the move.c hack (off-list
discussion) but apparently this is a general problem with the current
path-finding code which has nothing to do with the desynch. I have seen
other problems with transport path-finding as well, such as ships getting
move-to tasks to inland destinations. I have not tested yet if these
problems are still there in your latest developmental code.
In any case, I will check in the get_dir_from_cache hack. We can worry
about correct transport path finding later. It is good to be back in sync!
Hans