Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2001:
[Freeciv-Dev] Re: freeciv patch submission
Home

[Freeciv-Dev] Re: freeciv patch submission

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Guillaume Cottenceau <gc@xxxxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: freeciv patch submission
From: Thue <thue@xxxxxxx>
Date: Thu, 24 May 2001 16:33:39 +0200

> At 2001/05/24 09:49 , Guillaume Cottenceau wrote:
> >We've enjoyed the game -- only thing: we've been quite surprised with the
> >behaviour of the auto settlers. Thus I've changed a bit the hardcoded auto
> >settlers priority; here's the patch, I send it to you in case you're
> >interested. (it was still patching freeciv-cvs-May-12)
> >
> >Thanks for the great game!

What exactly does this patch accomplish, and how and why? :)

-Thue

> --- ./server/settlers.c.gege  Mon Jul 31 19:51:32 2000
> +++ ./server/settlers.c       Mon Jul 31 19:51:48 2000
> @@ -987,29 +987,6 @@
>
>       /* now, consider various activities... */
>
> -     d = (map_build_irrigation_time(x, y)*3 + mv_rate - 1)/mv_rate +
> -       mv_turns;
> -     consider_settler_action(pplayer, ACTIVITY_IRRIGATE, -1,
> -                             pcity->ai.irrigate[i][j], oldv, in_use, d,
> -                             &best_newv, &best_oldv, &best_act, &gx, &gy,
> -                             x, y);
> -
> -     if (unit_flag(punit->type, F_TRANSFORM)) {
> -       d = (map_transform_time(x, y)*3 + mv_rate - 1)/mv_rate +
> -         mv_turns;
> -       consider_settler_action(pplayer, ACTIVITY_TRANSFORM, -1,
> -                               pcity->ai.transform[i][j], oldv, in_use, d,
> -                               &best_newv, &best_oldv, &best_act, &gx, &gy,
> -                               x, y);
> -     }
> -
> -     d = (map_build_mine_time(x, y)*3 + mv_rate - 1)/mv_rate +
> -       mv_turns;
> -     consider_settler_action(pplayer, ACTIVITY_MINE, -1,
> -                             pcity->ai.mine[i][j], oldv, in_use, d,
> -                             &best_newv, &best_oldv, &best_act, &gx, &gy,
> -                             x, y);
> -
>          if (!(map_get_tile(x,y)->special&S_ROAD)) {
>         d = (map_build_road_time(x, y)*3 + 3 + mv_rate - 1)/mv_rate +
>           mv_turns;
> @@ -1035,6 +1012,29 @@
>                                 &best_newv, &best_oldv, &best_act, &gx, &gy,
>                                 x, y);
>          } /* end S_ROAD else */
> +
> +     d = (map_build_irrigation_time(x, y)*3 + mv_rate - 1)/mv_rate +
> +       mv_turns;
> +     consider_settler_action(pplayer, ACTIVITY_IRRIGATE, -1,
> +                             pcity->ai.irrigate[i][j], oldv, in_use, d,
> +                             &best_newv, &best_oldv, &best_act, &gx, &gy,
> +                             x, y);
> +
> +     if (unit_flag(punit->type, F_TRANSFORM)) {
> +       d = (map_transform_time(x, y)*3 + mv_rate - 1)/mv_rate +
> +         mv_turns;
> +       consider_settler_action(pplayer, ACTIVITY_TRANSFORM, -1,
> +                               pcity->ai.transform[i][j], oldv, in_use, d,
> +                               &best_newv, &best_oldv, &best_act, &gx, &gy,
> +                               x, y);
> +     }
> +
> +     d = (map_build_mine_time(x, y)*3 + mv_rate - 1)/mv_rate +
> +       mv_turns;
> +     consider_settler_action(pplayer, ACTIVITY_MINE, -1,
> +                             pcity->ai.mine[i][j], oldv, in_use, d,
> +                             &best_newv, &best_oldv, &best_act, &gx, &gy,
> +                             x, y);
>
>       d = (3*3 + mv_rate - 1)/mv_rate +
>         mv_turns;


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