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: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: better easy mode
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Thu, 31 Oct 2002 11:32:42 +0000 (GMT)

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);

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...

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

  - Per



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