Complete.Org: Mailing Lists: Archives: freeciv-ai: October 2002:
[freeciv-ai] Re: better easy mode
Home

[freeciv-ai] Re: better easy mode

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: better easy mode
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Thu, 31 Oct 2002 13:02:29 +0100

On Thu, Oct 31, 2002 at 11:32:42AM +0000, Per I. Mathisen wrote:
> On Thu, 31 Oct 2002, Raimar Falke wrote:
> > > There is already ai_unit_new_role() in aitools.c... it doesn't do all
> > > cases comprehensively yet - that is done in massive ai patch.
> >
> > And what about
> > ai/aiunit.c:1500:  ai_unit_set_role(punit, AIUNIT_ESCORT, -1, -1);  /* do 
> > not use ai_unit_new_role() */
> > ?
> 
> This is only a sanity check since it should already have this role. (The
> current AI has a problem with forgetting roles.) In my massive ai tree
> this problem has been fixed and the above line has been replaced by
> 
>       assert(punit->ai.ai_role == AIUNIT_ESCORT);

From my short reading there my be a problem with bodyguard assignment.

> Your API
> 
> +void ai_unit_set_role(struct unit *punit, enum ai_unit_task role,
> +                     int new_role_target_x, int new_role_target_y)
> 
> is IMHO superior, and your patch fixes some things that haven't yet been
> addressed in massiveai. 

> Your patch will now be assimilated into my tree...

Bad. It should instead be applied.

> ...and then I'll try to forward-port these changes as a separate patch.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Programming today is a race between software engineers striving to
  build bigger and better idiot-proof programs, and the Universe trying
  to produce bigger and better idiots. So far, the Universe is winning."
    -- Rich Cook


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