[Freeciv-Dev] (PR#6931) Goto waypoint bug
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=6931 >
> [ali - Sun Nov 23 16:25:51 2003]:
>
> Bug: maybe_cancel_goto_due_to_enemy() should idle the unit,
> like in maybe_cancel_patrol_due_to_enemy().
>
> Otherwise, unit retains the goto state when a non-attackable unit
> unexpectedly exists on a waypoint (only when using waypoint).
The goto (now orders) returns GR_FAILED. If this happens then the goto
should be canceled; the unit will be left in idle. It looks like the
goto/orders function expects the caller to do this, but of course the
caller doesn't.
Execute_orders should just return a bool indicating whether the unit
survives. Any other handling should be done within the function.
Perhaps a wrapper function would be helpful (to handle the different
return values). If not then the GR_*** enumeration can just be dropped.
jason
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#6931) Goto waypoint bug,
Jason Short <=
|
|