[Freeciv-Dev] Specials near rivers
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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
- [Freeciv-Dev] Specials near rivers,
Jerzy Klek <=
|
|