[Freeciv-Dev] (PR#10735) Fix ufly effect with separate poles when mounta
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#10735) Fix ufly effect with separate poles when mountains are near at border of it, for cvs and 2.0 |
From: |
"Marcelo Burda" <mburda@xxxxxxxxx> |
Date: |
Mon, 25 Oct 2004 21:07:12 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10735 >
Marcelo
? client/gui-gtk-2.0/stgi6Pnc
? server/.kdbgrc.civserver
Index: server/generator/temperature_map.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/generator/temperature_map.c,v
retrieving revision 1.4
diff -u -r1.4 temperature_map.c
--- server/generator/temperature_map.c 15 Oct 2004 21:45:17 -0000 1.4
+++ server/generator/temperature_map.c 26 Oct 2004 04:01:29 -0000
@@ -71,8 +71,6 @@
***************************************************************************/
void create_tmap(bool real)
{
- int i;
-
/* if map is defined this is not changed */
/* TO DO load if from scenario game with tmap */
assert(temperature_map == NULL); /* to debug, never load a this time */
@@ -99,6 +97,7 @@
tmap(ptile) = t * (1.0 + temperate) * (1.0 + height);
}
} whole_map_iterate_end;
+
/* adjust to get well sizes frequencies */
/* Notice: if colatitude is load from a scenario never call adjust has
scenario maybe has a odd colatitude ditribution and adjust will
@@ -107,17 +106,21 @@
adjust_int_map(temperature_map, MAX_COLATITUDE);
}
/* now simplify to 4 base values */
- for (i = 0; i < MAX_MAP_INDEX; i++) {
- int t = temperature_map[i];
+ whole_map_iterate(i) {
+ int t = temperature_map[i->index];
- if (t >= TROPICAL_LEVEL) {
- temperature_map[i] = TT_TROPICAL;
+ /* first if is a hack to avoid some ugly effect,
+ TODO: think if there is a best way, veriffy off by one in colatitude */
+ if (map_colatitude(i) < 2 * ICE_BASE_LEVEL) {
+ temperature_map[i->index] = TT_FROZEN;
+ } else if (t >= TROPICAL_LEVEL) {
+ temperature_map[i->index] = TT_TROPICAL;
} else if (t >= COLD_LEVEL) {
- temperature_map[i] = TT_TEMPERATE;
+ temperature_map[i->index] = TT_TEMPERATE;
} else if (t >= 2 * ICE_BASE_LEVEL) {
- temperature_map[i] = TT_COLD;
+ temperature_map[i->index] = TT_COLD;
} else {
- temperature_map[i] = TT_FROZEN;
+ temperature_map[i->index] = TT_FROZEN;
}
- }
+ } whole_map_iterate_end;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#10735) Fix ufly effect with separate poles when mountains are near at border of it, for cvs and 2.0,
Marcelo Burda <=
|
|