Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: PATCH: remove map_adjuxt_[xy] invocations
Home

[Freeciv-Dev] Re: PATCH: remove map_adjuxt_[xy] invocations

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: PATCH: remove map_adjuxt_[xy] invocations
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Thu, 04 Oct 2001 21:52:30 -0400

At 05:30 PM 01/10/03 -0400, Jason Dorje Short wrote:
>Jason Dorje Short wrote:
[...]
>>      if (a < 0)
>>        a = 0;
>>      hmap(x, y) = a / 10;
>>    } whole_map_iterate_end;
>>  }
>
>This part isn't correct.
>
>First, the code has problems right now since (as the comment says) the
>array itself gets overwritten as the map is iterated.  The feedback is
>unpredictible since it depends on the ordering of whole_map_iterate. 
>Thus changing whole_map_iterate will change the behavior, which is Not
>Good.  It also means extra smoothing, which probably wasn't the intent
>of the code.

This is actually code where it really doesn't matter that much. In fact
screwups may equally introduce beneficial or not effects. But the /10
is probably a little too consistent a bug to leave in.

[...]
>The new code is incorrect because it divides by 10 in any case, even if
>all 10 tile positions have not been added on.  This is easily corrected.

If you look at current smoothing, the world is actually pretty flat when
this gets done. The whole system here was rewritten to do a slightly
better job, and at least make it easier to deal with consistent local
geography later on. 

>A new patch will follow shortly.

I wouldn't waste too much time here, beyond the obvious fixes.

>jason




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