Difference for server/weather.c from version 1.5 to 1.6


version 1.5 version 1.6
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_weather_c =   * static char *rcsid_weather_c =
  *   "$Id: weather.c,v 1.5 2002/10/28 04:50:39 garbled Exp $";   *   "$Id: weather.c,v 1.6 2002/10/28 10:20:08 garbled Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 708
 
Line 708
      }       }
      delete_map(m);       delete_map(m);
      /* jesus thats confusing as all hell */       /* jesus thats confusing as all hell */
      weathermap[x][y].humid = water/(spwtx*spwty);       printf("water %d humid %d\n", water, water*100/(spwtx*spwty));
        weathermap[x][y].humid = water*100/(spwtx*spwty);
      weathermap[x][y].avgelev = elev/(spwtx*spwty);       weathermap[x][y].avgelev = elev/(spwtx*spwty);
      weathermap[x][y].water = weathermap[x][y].humid;       weathermap[x][y].water = weathermap[x][y].humid;
  }   }
Line 822
 
Line 823
     read_pressuremap();      read_pressuremap();
     read_winddirmap();      read_winddirmap();
     read_windspeedmap();      read_windspeedmap();
       read_watermap();
     read_humidmap();      read_humidmap();
     read_elevmap(); /* elevation must allways follow humidity */      read_elevmap(); /* elevation must allways follow humidity */
     read_temperaturemap();      read_temperaturemap();
Line 955
 
Line 957
   
     for (x=0; x < WEATHERMAPTILESX; x++)      for (x=0; x < WEATHERMAPTILESX; x++)
  for (y=0; y < WEATHERMAPTILESY; y++)   for (y=0; y < WEATHERMAPTILESY; y++)
      humid_tile(x, y);       weathermap[x][y].humid = humid_tile(x, y);
 }  }
   
 /* calculate the humidity of this tile */  /* calculate the humidity of this tile */
Line 985
 
Line 987
  if (x != WEATHERMAPTILESX)   if (x != WEATHERMAPTILESX)
      ox = x + 1;       ox = x + 1;
     }      }
     humid = MIN(100, (weathermap[x][y].humid + weathermap[ox][oy].humid * 2 +  
  weathermap[x][y].water + rndm(-2,2)) / 4);  
   
       humid = MIN(100, ((weathermap[x][y].humid * 2 +
    weathermap[ox][oy].humid * weathermap[ox][oy].windspeed +
    weathermap[x][y].water + rndm(-2, 2)) /
    (weathermap[ox][oy].windspeed+3)));
     return humid;      return humid;
 }  }
   


Legend:
line(s) removed in v.1.5 
line(s) changed
 line(s) added in v.1.6

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