[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]
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
goto_result.diff
Description: goto_result.diff
- [Freeciv-Dev] [Patch] Make do_unit_goto return a meaningful value (PR#985),
Gregory Berkolaiko <=
|
|