Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: Settlers turns left calculation in GUI is wrong. (PR#9
Home

[Freeciv-Dev] Re: Settlers turns left calculation in GUI is wrong. (PR#9

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Stepan Roh <stepan@xxxxxxxx>
Cc: andreas.beckmann@xxxxxxxxxxxxxxxxxxxx, Freeciv Developers List <freeciv-dev@xxxxxxxxxxx>, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Settlers turns left calculation in GUI is wrong. (PR#981)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 27 Sep 2001 14:19:04 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Thu, Sep 27, 2001 at 12:53:27PM +0200, Stepan Roh wrote:
> 
> 
> On Thu, 27 Sep 2001, Raimar Falke wrote:
> 
> > On Thu, Sep 27, 2001 at 12:05:39PM +0200, Stepan Roh wrote:
> > >
> > >
> > > On Thu, 27 Sep 2001, Raimar Falke wrote:
> > >
> > > > >    struct tile *ptile = map_get_tile(x, y);
> > > > >
> > > > >    memset(activity_total, 0, sizeof(activity_total));
> > > > >    memset(activity_units, 0, sizeof(activity_units));
> > > > >
> > > > >    unit_list_iterate(ptile->units, punit) {
> > > > > -    activity_total[punit->activity] += punit->activity_count;
> > > > >      mr = get_unit_type(punit->type)->move_rate;
> > > > > -    activity_units[punit->activity] += mr ? mr / SINGLE_MOVE : 1;
> > > >
> > > > Mhh what kinds of values does the term "mr ? mr / SINGLE_MOVE : 1" can
> > > > get? Can mr really be 0? Yes this isn't in your patch and I should
> > > > have catched this in the old patch.
> > >
> > > It comes from http://www.freeciv.org/lxr/source/server/unittools.c#L944.
> >
> > So what about the attached patch? It even works ;)
> 
> Hm, I don't get it.
> 
> 1) move_rate testing is wrong as it reads "... firepower must be at least
> 0..." and you're testing >=0 for movement rate.

Sorry copy and paste error.

> 2) I don't see any problem with move_rate = 0 - you can have unit which
> must be transported by any other one

Do we really want this? This would be a bunker or a watchtower or
something like this. To use this it is necessary that a unit can
create another unit or you transport them with a ship (railroad
doesn't work). Note that you can only transport the unit with
move_rate = 0 only from a city to a city with a ship.

So overall it may be a nice idea but it isn't possible now.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  This message has been ROT-13 encrypted twice for extra security.


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