version 1.22 | | version 1.23 |
---|
| | |
/* | | /* |
* static char *rcsid_weather_c = | | * static char *rcsid_weather_c = |
* "$Id: weather.c,v 1.22 2002/12/22 20:43:37 temitchell Exp $"; | | * "$Id: weather.c,v 1.23 2003/01/04 00:28:52 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
int real_world_temperature(int x, int y, mapstruct *m) | | int real_world_temperature(int x, int y, mapstruct *m) |
{ | | { |
int wx, wy, temp, eleva, elevb; | | int wx, wy, temp, eleva, elevb; |
| | object *op; |
| | |
worldmap_to_weathermap(x, y, &wx, &wy, m->path); | | worldmap_to_weathermap(x, y, &wx, &wy, m->path); |
temp = real_temperature(wx, wy); | | temp = real_temperature(wx, wy); |
| | |
eleva = 0; | | eleva = 0; |
else | | else |
eleva = weathermap[x][y].avgelev; | | eleva = weathermap[x][y].avgelev; |
elevb = GET_MAP_OB(m, x, y)->elevation; | | |
| | op= GET_MAP_OB(m, x, y); |
| | if (!op) return eleva; |
| | |
| | elevb = op->elevation; |
if (elevb < 0) | | if (elevb < 0) |
elevb = 0; | | elevb = 0; |
if (elevb > eleva) { | | if (elevb > eleva) { |