Kayle,
I decided to give your system another chance. I restored weather.c and weather.h to smaugfuss status.
I made a 11x11 grid this time instead of 3x3 cause you guys say may need more cells by it.
I did cells ( 10, 10 ), ( 10, 9 ), ( 10, 8 ), ( 9, 10 ) ( 9, 9 ), ( 9, 8 ), ( 8, 10 ), ( 8, 9 ), ( 8, 8 ) all northern arctic
weather updated and got 50 degrees in arctic climate in autum season for cell 10, 10
I did the opposite in ( 10, 0 ), ( 10, 1 ) ( 10, 2 ) ( 9, 0 ) ( 9, 1) ( 9, 2 ) ( 8, 0 ) ( 8, 1 ) ( 8, 2) all southern desert
weather updated and got 24 degrees for the desert climate in autum season in cell 10, 0
Some other fixes you may want to include are showweather ifchecks don't properly see if your at maxweatherx and y or not, = crash. A friend of mine provided this fix for showweather.
void do_showweather( CHAR_DATA *ch, char *argument )
{
char arg[MIL], arg2[MIL];
int x, y;
argument = one_argument( argument, arg );
argument = one_argument( argument, arg2 );
if( IS_NPC( ch ) )
{
send_to_char( "Mob's can't showweather.\r\n", ch );
return;
}
if( !ch->desc )
{
send_to_char( "Nice try, but You have no descriptor.\r\n", ch );
return;
}
if( !arg || arg[0] == '\0' || !arg2 || arg2[0] == '\0' )
{
send_to_char( "Syntax: showweather <x> <y>\r\n", ch );
return;
}
x = atoi( arg );
y = atoi( arg2 );
if( x < 0 || x > WEATHER_SIZE_X-1 )
{
ch_printf( ch, "X value must be between 0 and %d.\r\n", WEATHER_SIZE_X-1 );
return;
}
if( y < 0 || y > WEATHER_SIZE_Y-1 )
{
ch_printf( ch, "Y value must be between 0 and %d.\r\n", WEATHER_SIZE_Y-1 );
return;
}
struct WeatherCell *cell = &weatherMap[x][y];
ch_printf_color( ch, "Current Weather State for:\r\n" );
ch_printf_color( ch, "&WCell (&w%d&W, &w%d&W)&D\r\n", x, y );
ch_printf_color( ch, "&WClimate: &w%s&D\r\n", flag_string( cell->climate, climate_names ) );
ch_printf_color( ch, "&WHemisphere: &w%s&D\r\n", flag_string( cell->hemisphere, hemisphere_name ) );
ch_printf_color( ch, "&WCloud Cover: &w%d&D\r\n", cell->cloudcover );
ch_printf_color( ch, "&WEnergy: &w%d&D\r\n", cell->energy );
ch_printf_color( ch, "&WTemperature: &w%d&D\r\n", cell->temperature );
ch_printf_color( ch, "&WPressure: &w%d&D\r\n", cell->pressure );
ch_printf_color( ch, "&WHumidity: &w%d&D\r\n", cell->humidity );
ch_printf_color( ch, "&WPrecipitation: &w%d&D\r\n", cell->precipitation );
ch_printf_color( ch, "&WWind Speed XAxis: &w%d&D\r\n", cell->windSpeedX );
ch_printf_color( ch, "&WWind Speed YAxis: &w%d&D\r\n", cell->windSpeedY );
}
setweather will let you set the weather of a cell that doesn't exist for example if you have x and y set to 10
in weather.h it doesn't take into account 0. Thus it will let you setweather for 10, even though 9 is technically
your max. I just made it -1 for setweather and showweather and seems to fix that issue.