> It would be better if you just added a comment to
> what the if statement means,
> rather than add in more code and extra variables. 
> Something like:
> 
> /* Skip check for neut planets if we found an enemy
> agri to take and have
>    enough armies. */
> 
> You can also change the logic to:
> 
> if(!tpl || 
>     !( tpl->pl_flags&PLAGRI && 
>         me->p_armies >= 5 ) ) {

Yeah, I can make sense out of that one. I see how this
would generate more efficient machine code. 

>      * robotd/update_players.c changed
> closest_planet() function to return
>        the old closest_planet if it cannot find a
> closest planet.

> This is not what my fix to the bug in closest_planet
> is about at all.
> Hadley's fuction had a bug where it would usually
> not find a closest planet
> every other update.
> 
>      * robotd/update_players.c:  The function
> closest_planet() would
>        usually return NULL every other time it was
> called.  It checks
>        the distance to opl, the previous closest
> planet, and if the
>        player is very close it doesn't bother
> searching.  If the
>        player isn't very close, it would search for
> a planet _closer_
>        than opl.  If opl was still the closest, it
> won't find a closer
>        planet, but instead of returning opl, it
> would return NULL.

Uh, I think it's just symantecs. I meant to say

>      * robotd/update_players.c changed
> closest_planet() function to return
>        the old closest_planet if it cannot find a
> closer planet.

-- instead of returning NULL. Get it?

Anyways, patch doesn't introduce new bugs or bad
programming into the repo. 

Play testing shows that robotd works better! Much
better. 

So hopefully James or Stephen can apply the patch! It
looks okay. 

Messaging still gets screwed up 5 hours into a newbie
game. Not sure why though, no outright crash occurs.
No SIGSEV.  robots announce they carry, but do not
follow-up with where they want to carry to. Robots
continue to fight and take as normal though which is
good. 

Jimmy