[Freeciv-Dev] (PR#9799) PATCH: adjust_map rewritten
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9799 >
> [mburda - Thu Sep 02 06:23:51 2004]:
>
> Le jeu 02/09/2004 à 01:31, Jason Short a écrit :
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=9799 >
> >
> > With this small change
> >
> > int hmap_swamp_level = ((hmap_max_level - hmap_shore_level)
> > * map.swampsize) / 100 + hmap_shore_level;
> >
> > some swamps come back. 3 of them. However based on 30% land you'd
> > think there would be
> >
> > 4000 * 30% * 5% = 60
> >
> > swamps. So something's still not right. But since we want to get rid
> > of map.swamps later anyway this may not be a big deal.
> >
> > jason
> >
> this is ok for me. (but not solve the problem!)
>
See void make_swamps(void):
for (swamps = 0; swamps < map.swampsize; ) { /// ????
forever++;
if (forever > 1000) {
return;
}
rand_map_pos(&x, &y);
if (not_placed(x, y)
&& hmap(x, y) < hmap_swamp_level) {
map_set_terrain(x, y, T_SWAMP);
cardinal_adjc_iterate(x, y, x1, y1) {
if (myrand(10) > 5 && !is_ocean(map_get_terrain(x1, y1))
&& map_get_terrain(x1, y1) != T_SWAMP ) {
map_set_terrain(x1, y1, T_SWAMP);
swamps++;
}
} cardinal_adjc_iterate_end;
swamps++;
}
}
That's why increasing swamp_level doesn't change the behavior much.
Because there will be about map.swampsize swamps placed, not
MAX_MAP_INDEX*ladmass%*swamp_size%
--
mateusz
- [Freeciv-Dev] (PR#9799) PATCH: rewrited adjust_map(), (continued)
- [Freeciv-Dev] (PR#9799) PATCH: rewrited adjust_map(), Marcelo Burda, 2004/09/01
- [Freeciv-Dev] Re: (PR#9799) PATCH: rewrited adjust_map(), Jason Short, 2004/09/01
- [Freeciv-Dev] Re: (PR#9799) PATCH: rewrited adjust_map(), Marcelo Burda, 2004/09/01
- [Freeciv-Dev] Re: (PR#9799) PATCH: rewrited adjust_map(), Marcelo Burda, 2004/09/01
- [Freeciv-Dev] Re: (PR#9799) PATCH: rewrited adjust_map(), Jason Short, 2004/09/01
- [Freeciv-Dev] Re: (PR#9799) PATCH: rewrited adjust_map(), Marcelo Burda, 2004/09/01
- [Freeciv-Dev] (PR#9799) PATCH: rewrited adjust_map(), Marcelo Burda via RT, 2004/09/01
- [Freeciv-Dev] (PR#9799) ITC: PATCH: rewrited adjust_map(), Mateusz Stefek, 2004/09/01
- [Freeciv-Dev] Re: (PR#9799) ITC: PATCH: rewrited adjust_map(), Jason Short, 2004/09/01
- [Freeciv-Dev] Re: (PR#9799) ITC: PATCH: rewrited adjust_map(), Marcelo Burda, 2004/09/02
- [Freeciv-Dev] (PR#9799) PATCH: adjust_map rewritten,
Mateusz Stefek <=
- [Freeciv-Dev] Re: (PR#9799) PATCH: adjust_map rewritten, Marcelo Burda, 2004/09/02
- [Freeciv-Dev] (PR#9799) PATCH: adjust_map rewritten, Mateusz Stefek, 2004/09/02
- [Freeciv-Dev] Re: (PR#9799) PATCH: adjust_map rewritten, Marcelo Burda, 2004/09/02
|
|