Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: Unused field in move_cost_map removed. (PR#966)
Home

[Freeciv-Dev] Re: Unused field in move_cost_map removed. (PR#966)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Unused field in move_cost_map removed. (PR#966)
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Tue, 18 Sep 2001 05:51:25 -0700 (PDT)

 --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote: 
> On Tue, Sep 18, 2001 at 12:39:32PM +0100, Gregory Berkolaiko wrote:
> 
> I looks like I miss something here: returned is malloc'ed, memset'ed
> and tested but NEVER set. So the this variable is useless. If you also
> come to this conclusion I don't understand why you made test runs?

To see if maybe correct usage of this field gives better performance.

> So what you think is the correct usage of this field?

to set it ;) when you return a location; see the attached patch (please
DO NOT apply it)

> > "returned" field.  The savegames from the runs were identical in all
> > cases 
> > (expected)
> 
> You mention above that such "occurence is quite rare".

Yes, and even if it happens, the returned location is processed but
nothing is actually changed.  It happens mostly on land, when a "longer"
route is cheaper in movepoints.  Such location goes into queue twice (or
more) but the cheaper route gets out of the queue first anyway.

> In its current form it is useless. I also vote for removing. (Mhh this
> is the second code construct in server/gotohand.[ch] which has no
> effect).

more to come, more to come....

G.


____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

Attachment: add_returned.diff
Description: add_returned.diff


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: Unused field in move_cost_map removed. (PR#966), Gregory Berkolaiko <=