Difference for server/weather.c from version 1.44 to 1.45


version 1.44 version 1.45
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_weather_c =   * static char *rcsid_weather_c =
  *   "$Id: weather.c,v 1.44 2005/11/27 14:16:46 ryo_saeba Exp $";   *   "$Id: weather.c,v 1.45 2005/11/27 14:19:13 ryo_saeba Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 429
 
Line 429
     /* perform_weather must follow calculators */      /* perform_weather must follow calculators */
     perform_weather();      perform_weather();
  if (settings.dynamiclevel > 0) {   if (settings.dynamiclevel > 0) {
 /* write_weather_images();*/   write_weather_images();
  spin_globe();   spin_globe();
  }   }
 }  }
Line 1359
 
Line 1359
     if (wmperformstarty == settings.worldmaptilesy)      if (wmperformstarty == settings.worldmaptilesy)
  wmperformstartx = wmperformstarty = 0;   wmperformstartx = wmperformstarty = 0;
    
  wmperformstartx = 3;   
  wmperformstarty = 27;   
       
     sprintf(filename, "world/world_%d_%d",      sprintf(filename, "world/world_%d_%d",
  wmperformstartx+settings.worldmapstartx,   wmperformstartx+settings.worldmapstartx,
  wmperformstarty+settings.worldmapstarty);   wmperformstarty+settings.worldmapstarty);
Line 1604
 
Line 1601
      if (!strcmp(oldsnow->arch->name, at->name))       if (!strcmp(oldsnow->arch->name, at->name))
  at = NULL;   at = NULL;
      else {        else {
  if (!strcmp(oldsnow->name,"grass")) {   
  LOG(llevError,"grass");   
  }  
  remove_ob(oldsnow);   remove_ob(oldsnow);
  free_object(oldsnow);   free_object(oldsnow);
  tmp=GET_MAP_OB(m, x, y);   tmp=GET_MAP_OB(m, x, y);
Line 1633
 
Line 1627
  }   }
  if (tmp != NULL && doublestack2 != NULL)   if (tmp != NULL && doublestack2 != NULL)
      if (strcmp(tmp->arch->name, doublestack2) == 0) {        if (strcmp(tmp->arch->name, doublestack2) == 0) {
  if (!strcmp(tmp->name,"grass")) {   
  LOG(llevError,"grass");   
  }  
  remove_ob(tmp);   remove_ob(tmp);
  free_object(tmp);   free_object(tmp);
      }       }
Line 1679
 
Line 1670
      }       }
      if (avoid) {       if (avoid) {
  /* replace snow with a big puddle */    /* replace snow with a big puddle */
  if (!strcmp(tmp->name,"grass")) {   
  LOG(llevError,"grass");   
  }  
  remove_ob(tmp);   remove_ob(tmp);
  free_object(tmp);   free_object(tmp);
  tmp=GET_MAP_OB(m, x, y);   tmp=GET_MAP_OB(m, x, y);
Line 1846
 
Line 1834
  at = NULL;   at = NULL;
      else {       else {
  tmp=GET_MAP_OB(m, x, y);   tmp=GET_MAP_OB(m, x, y);
  if (!strcmp(oldsnow->name,"grass")) {   
  LOG(llevError,"grass");   
  }   
  remove_ob(oldsnow);   remove_ob(oldsnow);
  /* clean up the trees we put over the snow */   /* clean up the trees we put over the snow */
  found = 0;   found = 0;
Line 1873
 
Line 1858
  free_object(oldsnow);   free_object(oldsnow);
  if (tmp != NULL && doublestack2 != NULL)   if (tmp != NULL && doublestack2 != NULL)
      if (strcmp(tmp->arch->name, doublestack2) == 0) {        if (strcmp(tmp->arch->name, doublestack2) == 0) {
  if (!strcmp(tmp->name,"grass")) {   
  LOG(llevError,"grass");   
  }  
  remove_ob(tmp);   remove_ob(tmp);
  free_object(tmp);   free_object(tmp);
      }       }
Line 1888
 
Line 1870
      ob->y = y;       ob->y = y;
      SET_FLAG(ob, FLAG_OVERLAY_FLOOR);       SET_FLAG(ob, FLAG_OVERLAY_FLOOR);
      ob->material = M_LIQUID;        ob->material = M_LIQUID;
  if ( x == 10 && y == 10 )   
  {   
  x = x;   
  }  
      insert_ob_in_map(ob, m, ob,       insert_ob_in_map(ob, m, ob,
          INS_NO_MERGE | INS_NO_WALK_ON | INS_ABOVE_FLOOR_ONLY);           INS_NO_MERGE | INS_NO_WALK_ON | INS_ABOVE_FLOOR_ONLY);
      if (two) {       if (two) {
Line 1901
 
Line 1879
      copy_object(&at->clone, ob);       copy_object(&at->clone, ob);
      ob->x = x;       ob->x = x;
      ob->y = y;        ob->y = y;
  if ( x == 10 && y == 10 )   
  {   
  x = x;   
  }  
      insert_ob_in_map(ob, m, ob,       insert_ob_in_map(ob, m, ob,
  INS_NO_MERGE | INS_NO_WALK_ON | INS_ON_TOP);   INS_NO_MERGE | INS_NO_WALK_ON | INS_ON_TOP);
  }   }
Line 1931
 
Line 1905
  else if (!strcmp(tmp->arch->name, "mountain2_rivlets"))   else if (!strcmp(tmp->arch->name, "mountain2_rivlets"))
  avoid++;   avoid++;
      if (avoid) {       if (avoid) {
  if (!strcmp(tmp->name,"grass")) {   
  LOG(llevError,"grass");   
  }   
  remove_ob(tmp);   remove_ob(tmp);
  free_object(tmp);   free_object(tmp);
  if (weathermap[wx][wy].humid < 100 && rndm(0, 50) == 0)   if (weathermap[wx][wy].humid < 100 && rndm(0, 50) == 0)
Line 1961
 
Line 1932
  }   }
  if (tmp != NULL && doublestack2 != NULL)   if (tmp != NULL && doublestack2 != NULL)
      if (strcmp(tmp->arch->name, doublestack2) == 0) {        if (strcmp(tmp->arch->name, doublestack2) == 0) {
  if (!strcmp(tmp->name,"grass")) {   
  LOG(llevError,"grass");   
  }  
  remove_ob(tmp);   remove_ob(tmp);
  free_object(tmp);   free_object(tmp);
      }       }
Line 2019
 
Line 1987
      rndm(0, MIN(weather_grow[i].random/2, 1)) == 0) {       rndm(0, MIN(weather_grow[i].random/2, 1)) == 0) {
      /* the herb does not belong, randomly delete       /* the herb does not belong, randomly delete
        herbs to prevent overgrowth. */         herbs to prevent overgrowth. */
      if (!strcmp(tmp->name,"grass")) {   
  LOG(llevError,"grass");   
  }   
  remove_ob(tmp);   remove_ob(tmp);
      free_object(tmp);       free_object(tmp);
      break;       break;
Line 2144
 
Line 2109
      weathermap[wx][wy].humid > weather_tile[i].humax ||       weathermap[wx][wy].humid > weather_tile[i].humax ||
      temp < weather_tile[i].tempmin ||       temp < weather_tile[i].tempmin ||
      temp > weather_tile[i].tempmax) {        temp > weather_tile[i].tempmax) {
  if (!strcmp(tmp->name,"grass") && tmp->x == 10 && tmp->y == 10) {   
  LOG(llevError,"grass");   
  }  
      remove_ob(tmp);       remove_ob(tmp);
      free_object(tmp);       free_object(tmp);
      if (doublestack) {       if (doublestack) {
  if (!strcmp(doublestack->name,"grass")) {   
  LOG(llevError,"grass");   
  }   
  remove_ob(doublestack);   remove_ob(doublestack);
  free_object(doublestack);   free_object(doublestack);
      }       }


Legend:
line(s) removed in v.1.44 
line(s) changed
 line(s) added in v.1.45

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:53