<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39852 >

> [wsimpson - Mar. Nov. 13 10:51:44 2007]:
> 
> Pepeto _ wrote:
> > - It ignores if unit hasn't its full moves left. For example, if
> your
> > unit already did some move this turn, it check as your unit didn't
> make
> > this moves.
> >
> Amazingly, you are actually correct.  I tried moving the fighter one
> move,
> the display correctly shows (6)6 -- but the code passes in the value 7
> to
> the callback function!
> 
> Yet another annoying bug in the badly written pathfinding code.  My
> guess is
> the entire thing needs to be reviewed -- some logic error elsewhere
> the fuel
> isn't being properly decremented.  (All I can easily find are the
> places it's
> _correctly_ decremented.)
> 
> But since the visual display is correct, this should not delay 2.1.1.
> 
> I don't think we should be doing any more than fixing crashers.  Code
> improvements are for *.minor.* releases, not *.*.trivial releases.
> 
> 
> 

For this bug, there is a very simple trick to change:
-  int fuel = param->move_rate * param->fuel_left_initially;
+  int fuel = param->moves_left_initially + param->move_rate *
(param->fuel_left_initially - 1)


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to