Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] (PR#6931) Goto waypoint bug
Home

[Freeciv-Dev] (PR#6931) Goto waypoint bug

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: a-l@xxxxxxx
Subject: [Freeciv-Dev] (PR#6931) Goto waypoint bug
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 24 Jan 2004 22:56:35 -0800
Reply-to: rt@xxxxxxxxxxx

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