Complete.Org: Mailing Lists: Archives: freeciv-dev: May 1999:
Re: [Freeciv-Dev] caravan behavior
Home

Re: [Freeciv-Dev] caravan behavior

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] caravan behavior
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Wed, 5 May 1999 22:09:09 +1000 (EST)

On Sun, 2 May 1999 Nicolas Brunel wrote:

> > I was fed up cheating with my caravans so I looked into the code...
> > The problem is that you can gain a move using a move when you're near
> > a city and want to help to build wonder even if you can't move to this
> > city (i.e. 0 moves left). This seems nonsense to me.
> 
> Here is a modified version of Fabrice Noilhan patch.
> 
> Best regards,
> 
> Index: server/unithand.c
> ===================================================================
> RCS file: /home/freeciv/CVS/freeciv/server/unithand.c,v
> retrieving revision 1.66
> diff -u -r1.66 unithand.c
> --- unithand.c        1999/04/26 07:16:19     1.66
> +++ unithand.c        1999/05/02 18:27:55
> @@ -961,6 +961,7 @@
>      pcity_dest=find_city_by_id(req->city_id);
>      
>      if(unit_flag(punit->type, F_CARAVAN) && pcity_dest &&
> +              try_move_unit(punit,pcity_dest->x,pcity->y) && 
>         unit_can_help_build_wonder(punit, pcity_dest)) {
>        pcity_dest->shield_stock+=50;
>        if (build_points_left(pcity_dest) < 0) {

Yeah, that's not bad; certainly better than the current
situation.  (Well, once you fix the deliberate syntax error ;-)

The only remaining problem is that the client pops up a menu, 
and _then_ the server works out whether the unit can make 
the move, whereas ideally it should be the other way around 
(but that would be harder to implement).

Regards,
-- David

[Prev in Thread] Current Thread [Next in Thread]