[Freeciv-Dev] (PR#10759) Alltemperate Bug
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10759 >
> [jdorje - Jeu. Oct. 28 07:19:28 2004]:
>
> Marcelo Burda wrote:
>
> > a good gen-terrains ruleset need at last one terrains type with starter
> > flag for all climatic zones,
>
> No. We don't want players starting on tundra or forest (I think) by
> default.
>
> > if temperature is set to 0 in a alltemperate map all near oceans map
> > will get as cold and all high terrains too then probably all map is
> > tundra, mountains, hill, forest and maybe dessert, no terrains has
> > starter flags and code fail to count goodies ! in tiny maps there are no
> > room for 30 players!
>
> When that happens we can ignore the Starter terrain flag - so long as we
> give a warning message. Then we can try placement again on all
> non-dangerous terrains.
>
> jason
>
>
>
this last version for this patch fix some Posible crashes in very extrme
configuration, has a temp 0 landmass 15, size 1 wet 0 player 30,
probably no more crash will apear a this point, to be commited for next
beta!
Marcelo
? client/gui-gtk-2.0/stgi6Pnc
? server/.kdbgrc.civserver
Index: data/civ1/terrain.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/civ1/terrain.ruleset,v
retrieving revision 1.30
diff -u -r1.30 terrain.ruleset
--- data/civ1/terrain.ruleset 14 Sep 2004 00:01:34 -0000 1.30
+++ data/civ1/terrain.ruleset 7 Nov 2004 18:01:04 -0000
@@ -284,6 +284,7 @@
warmer_drier_result = "Desert"
cooler_wetter_result = "no"
cooler_drier_result = "no"
+flags = "Starter"
helptext = _("\
Forests are densely wooded, making agriculture somewhat\
problematic.\
@@ -366,6 +367,7 @@
warmer_drier_result = "no"
cooler_wetter_result = "no"
cooler_drier_result = "no"
+flags = "Starter"
helptext = _("\
In addition to being amenable to agriculture, Hills are frequently\
rich in resources.\
@@ -616,7 +618,7 @@
warmer_drier_result = "no"
cooler_wetter_result = "Arctic"
cooler_drier_result = "Arctic"
-flags = "NoBarbs"
+flags = "Starter", "NoBarbs"
helptext = _("\
Tundra are broad, cold regions, fit for some agriculture and little\
else.\
Index: data/civ2/terrain.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/civ2/terrain.ruleset,v
retrieving revision 1.32
diff -u -r1.32 terrain.ruleset
--- data/civ2/terrain.ruleset 14 Sep 2004 00:01:35 -0000 1.32
+++ data/civ2/terrain.ruleset 7 Nov 2004 18:01:07 -0000
@@ -293,7 +293,7 @@
warmer_drier_result = "Desert"
cooler_wetter_result = "no"
cooler_drier_result = "no"
-flags = "CanHaveRiver"
+flags = "Starter", "CanHaveRiver"
helptext = _("\
Forests are densely wooded, making agriculture somewhat\
problematic.\
@@ -376,7 +376,7 @@
warmer_drier_result = "no"
cooler_wetter_result = "no"
cooler_drier_result = "no"
-flags = "CanHaveRiver"
+flags = "Starter", "CanHaveRiver"
helptext = _("\
In addition to being amenable to agriculture, Hills are frequently\
rich in resources.\
@@ -631,7 +631,7 @@
warmer_drier_result = "no"
cooler_wetter_result = "Glacier"
cooler_drier_result = "Glacier"
-flags = "NoBarbs", "CanHaveRiver"
+flags = "Starter", "NoBarbs", "CanHaveRiver"
helptext = _("\
Tundra are broad, cold regions, fit for some agriculture and little\
else.\
Index: data/default/terrain.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/default/terrain.ruleset,v
retrieving revision 1.34
diff -u -r1.34 terrain.ruleset
--- data/default/terrain.ruleset 7 Oct 2004 12:45:32 -0000 1.34
+++ data/default/terrain.ruleset 7 Nov 2004 18:01:09 -0000
@@ -311,7 +311,7 @@
warmer_drier_result = "Desert"
cooler_wetter_result = "no"
cooler_drier_result = "no"
-flags = "CanHaveRiver"
+flags = "Starter","CanHaveRiver"
helptext = _("\
Forests are densely wooded, making agriculture somewhat\
problematic.\
@@ -404,7 +404,7 @@
warmer_drier_result = "no"
cooler_wetter_result = "no"
cooler_drier_result = "no"
-flags = "CanHaveRiver"
+flags = "Starter", "CanHaveRiver"
helptext = _("\
In addition to being amenable to agriculture, Hills are frequently\
rich in resources.\
@@ -688,7 +688,7 @@
warmer_drier_result = "no"
cooler_wetter_result = "Glacier"
cooler_drier_result = "Glacier"
-flags = "NoBarbs", "CanHaveRiver"
+flags = "Starter", "NoBarbs", "CanHaveRiver"
helptext = _("\
Tundra are broad, cold regions, fit for some agriculture and little\
else.\
Index: server/generator/startpos.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/generator/startpos.c,v
retrieving revision 1.5
diff -u -r1.5 startpos.c
--- server/generator/startpos.c 20 Oct 2004 04:20:02 -0000 1.5
+++ server/generator/startpos.c 7 Nov 2004 18:01:31 -0000
@@ -186,6 +186,8 @@
int tile_value_aux[MAX_MAP_INDEX], tile_value[MAX_MAP_INDEX];
int min_goodies_per_player = 2000;
int total_goodies = 0;
+ /* this is factor is used to maximize land used in extreme little maps */
+ float efactor = game.nplayers / map.size / 4;
/* Unsafe terrains separate continents, otherwise small areas of green
* near the poles could be populated by a civilization if that pole
@@ -254,13 +256,15 @@
if (mode == MT_ALL
&& (islands[1].goodies < game.nplayers * min_goodies_per_player
- || islands[1].goodies < total_goodies * 0.5)) {
+ || islands[1].goodies < total_goodies * (0.5 + 0.8 * efactor)
+ / (1 + efactor))) {
mode = MT_VARIABLE;
}
/* the variable way is the last posibility */
if (mode == MT_VARIABLE) {
- min_goodies_per_player = total_goodies * 0.65 / game.nplayers;
+ min_goodies_per_player = total_goodies * (0.65 + 0.8 * efactor)
+ / (1 + efactor) / game.nplayers;
}
{
|
|