| version 1.25 | | version 1.26 |
|---|
| | |
| /* | | /* |
| * static char *rcsid_weather_c = | | * static char *rcsid_weather_c = |
| * "$Id: weather.c,v 1.25 2003/01/28 05:12:35 temitchell Exp $"; | | * "$Id: weather.c,v 1.26 2003/01/29 05:44:08 temitchell Exp $"; |
| */ | | */ |
| /* | | /* |
| CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
| } | | } |
| } | | } |
| } | | } |
| if (temp > 8) { | | if (temp > 8 && GET_MAP_OB(m, x, y) !=NULL) { |
| /* melt some snow */ | | /* melt some snow */ |
| for (tmp=GET_MAP_OB(m, x, y)->above; tmp; tmp = tmp->above) { | | for (tmp=GET_MAP_OB(m, x, y)->above; tmp; tmp = tmp->above) { |
| avoid = 0; | | avoid = 0; |
| | |
| if (rndm(1, weather_grow[i].random) != 1) | | if (rndm(1, weather_grow[i].random) != 1) |
| continue; | | continue; |
| /* we look up through two tiles for a matching tile */ | | /* we look up through two tiles for a matching tile */ |
| if (weather_grow[i].tile != NULL) { | | if (weather_grow[i].tile != NULL && GET_MAP_OB(m, x, y) != NULL) { |
| if (strcmp(GET_MAP_OB(m, x, y)->arch->name, | | if (strcmp(GET_MAP_OB(m, x, y)->arch->name, |
| weather_grow[i].tile) != 0) { | | weather_grow[i].tile) != 0) { |
| if (GET_MAP_OB(m, x, y)->above != NULL) { | | if (GET_MAP_OB(m, x, y)->above != NULL) { |