Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [PATCH] Corecleanup_07Part1 has been put in incoming
Home

[Freeciv-Dev] Re: [PATCH] Corecleanup_07Part1 has been put in incoming

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] Corecleanup_07Part1 has been put in incoming
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Sun, 26 Aug 2001 10:42:30 -0400

If the search distance is 1 this looks like it doesn't search.

That would be counter-intuitive, and a completely different idea of
search distance than used elsewhere.

But a blind update is as you sugggest. I think there is a fix needed
here somehere though. 

I guess this means you didn't really review this last week? 

My assumption is that everything but the suggested changes was deemed 
appropratiate for CVS, with the usual caveat that further bugfixing could 
cleanup any stuff that was glossed over.

Cheers,
RossW
=====

At 01:17 PM 01/08/26 +0200, Raimar Falke wrote:
>On Sat, Aug 25, 2001 at 07:02:22PM -0400, Ross W. Wetmore wrote:
>
>> Subject:  [Patch4cvs] Corecleanup_07c patch
>
>-  for( i = 1-search_dist; i < search_dist; i++ ) {
>-    for( j = 1-search_dist; j < search_dist; j++ ) {
>-      xx = map_adjust_x(punit->x + i);
>-      yy = map_adjust_y(punit->y + j);
>+  square_iterate(punit->x,punit->y, search_dist, xx,yy) {
>
>IMHO this has to be
>+  square_iterate(punit->x,punit->y, search_dist - 1, xx,yy) {
>
>-    for (dx = -1; dx <= 1; dx++) {
>-      for (dy = -1; dy <= 1; dy++) {
>-       x = map_adjust_x(leader->x + dx);
>-       y = map_adjust_y(leader->y + dy);
>-       if (warmap.cost[x][y] > safest
>+    adjc_iterate(leader->x,leader->y, x,y) {
>+      if (warmap.cost[x][y] > safest
>
>IMHO this is a square_iterate instead of an adjc_iterate.
>
>       Raimar
>
>-- 
> email: rf13@xxxxxxxxxxxxxxxxx
>  One nuclear bomb can ruin your whole day.




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