Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2005:
[Freeciv-Dev] (PR#9856) RFC: caravans advisor
Home

[Freeciv-Dev] (PR#9856) RFC: caravans advisor

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#9856) RFC: caravans advisor
From: "Benoit Hudson" <bh@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 10 Jan 2005 07:38:03 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=9856 >

> [per - Sun Jan 09 23:44:53 2005]:
> > > You do not check if the caravan might have died during goto. This is
> > > necessary (autoattack, huts).
> >
> > The old code didn't do either of these, so I don't really have an
> > answer for you.Why would it have worked before?  Was it buggy?
> 
> Yes. The chance of the manifesting itself here is low (once you have
> caravans, most huts will be explored away), but this is still a bug. With
> autoattack this will happen more often, too.

I don't think there's a problem.  Yes, ai_unit_goto might use up the
unit, but I don't touch it after that call (it's clearer in the new patch),
same as the handle_* calls.  The entire code path from ai_manage_unit
is pretty similar to the diplomat and explorer paths: upon return, the
unit may or may not exist anymore, but they don't seem to do any
bookeeping themselves about removing the unit from play.

Attachment: caravan_ai.diff
Description: Binary data


[Prev in Thread] Current Thread [Next in Thread]