Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] [Patch] Make do_unit_goto return a meaningful value (PR#98
Home

[Freeciv-Dev] [Patch] Make do_unit_goto return a meaningful value (PR#98

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] [Patch] Make do_unit_goto return a meaningful value (PR#985)
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Sat, 29 Sep 2001 14:16:32 -0700 (PDT)

Since do_unit_goto attempts to change the location of a unit and can
fail/succeed in a number of different ways. This information is later
extracted indirectly and used by other code, e.g.
  http://www.freeciv.org/lxr/source/ai/aiunit.c?v=cvs#L234
  http://www.freeciv.org/lxr/source/ai/aiunit.c?v=cvs#L894

I think it would be better to have do_unit_goto return a meaningful
answer.

Attached patch introduces 
  enum goto_result 
and makes do_unit_goto and goto_route_execute return a value of this
type.

So far it is not used but I really need it to improve ai_manage_explorer.

The testgames are identical with/without the patch.

Best,
G.

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

Attachment: goto_result.diff
Description: goto_result.diff


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