Complete.Org: Mailing Lists: Archives: freeciv-dev: October 1999:
[Freeciv-Dev] Specials near rivers
Home

[Freeciv-Dev] Specials near rivers

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Specials near rivers
From: Jerzy Klek <qpkjeek@xxxxxxxxxxxxxxx>
Date: Wed, 20 Oct 1999 18:32:04 +0200 (MET DST)

Hi

I just noticed a funny thing: when specials are added
during map generation, map.c:is_special_is_close() is called:

int is_special_close(int x, int y)
{
  int x1,y1;
  for (x1=x-1;x1<x+2;x1++)
    for (y1=y-1;y1<=y+2;y1++) 
      if(map_get_tile(x1,y1)->special)
        return 1;
  return 0;
}

but now rivers are also specials so as an effect, you never
get specials near rivers. Is it on purpose, or noone noticed it?
I find it not nice really, what about changing this?

--- freeciv/common/map.c        Tue Oct  5 12:46:05 1999
+++ freeciv-b/common/map.c      Wed Oct 20 18:20:57 1999
@@ -443,7 +443,7 @@
   int x1,y1;
   for (x1=x-1;x1<x+2;x1++)
     for (y1=y-1;y1<=y+2;y1++) 
-      if(map_get_tile(x1,y1)->special)
+      if(map_get_tile(x1,y1)->special & ~(S_RIVER))
        return 1;
   return 0;
 }

I tested it and it really makes a difference. 
I can send some example maps if you want...

/Jerzy



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