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


version 1.43 version 1.44
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_weather_c =   * static char *rcsid_weather_c =
  *   "$Id: weather.c,v 1.43 2005/11/01 09:02:55 akirschbaum Exp $";   *   "$Id: weather.c,v 1.44 2005/11/27 14:16:46 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 1601
 
Line 1604
      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 1627
 
Line 1633
  }   }
  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 1670
 
Line 1679
      }       }
      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 1834
 
Line 1846
  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 1858
 
Line 1873
  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 1870
 
Line 1888
      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 1879
 
Line 1901
      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 1905
 
Line 1931
  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 1932
 
Line 1961
  }   }
  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 1987
 
Line 2019
      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 2109
 
Line 2144
      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.43 
line(s) changed
 line(s) added in v.1.44

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