[Freeciv-Dev] Re: movement
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, Aug 14, 2002 at 03:54:36PM +0200, Raimar Falke wrote:
> The current try_move_unit
>
> bool try_move_unit(struct unit *punit, int dest_x, int dest_y)
> {
> if (myrand(1+map_move_cost(punit, dest_x, dest_y))>punit->moves_left &&
> punit->moves_left<unit_move_rate(punit)) {
> punit->moves_left=0;
> send_unit_info(unit_owner(punit), punit);
> }
> return punit->moves_left > 0;
> }
>
> is hard to read.
As a bystander, I spent some 30 minutes studying this code yesterday,
to see if I had an opinion on whether the change would be a good idea.
I gave up not because of try_move_unit() but because I didn't have
any idea if it was being called in the right places. Someone suggested
it isn't being called when goto is used on units, but I couldn't
verify that.
The logic of movement seems to be spread around far too much.
--
Reinier
- [Freeciv-Dev] Re: irc summary, (continued)
- [Freeciv-Dev] Re: irc summary, Christian Knoke, 2002/08/13
- [Freeciv-Dev] Re: irc summary, Brandon Craig Rhodes, 2002/08/13
- [Freeciv-Dev] Re: irc summary, Raimar Falke, 2002/08/14
- [Freeciv-Dev] Re: irc summary, Christian Knoke, 2002/08/14
- [Freeciv-Dev] movement, Per I. Mathisen, 2002/08/14
- [Freeciv-Dev] Re: movement, Raimar Falke, 2002/08/14
- [Freeciv-Dev] Re: movement, Per I. Mathisen, 2002/08/14
- [Freeciv-Dev] Re: movement, Raimar Falke, 2002/08/14
- [Freeciv-Dev] Re: movement,
Reinier Post <=
- [Freeciv-Dev] Re: movement, Anthony J. Stuckey, 2002/08/14
- [Freeciv-Dev] Re: movement, Brandon Craig Rhodes, 2002/08/14
- [Freeciv-Dev] Re: movement, Thomas Strub, 2002/08/14
- [Freeciv-Dev] Re: movement, Brandon Craig Rhodes, 2002/08/14
- [Freeciv-Dev] Re: movement, Thomas Strub, 2002/08/14
- [Freeciv-Dev] Re: movement, Brandon Craig Rhodes, 2002/08/14
- [Freeciv-Dev] Re: movement, Thomas Strub, 2002/08/14
- [Freeciv-Dev] Re: movement, Brandon Craig Rhodes, 2002/08/14
- [Freeciv-Dev] Re: movement, Raimar Falke, 2002/08/14
- [Freeciv-Dev] Re: movement, Christian Knoke, 2002/08/14
|
|