James,
I think I found a bug which will cause the problems experienced by Dante, though I don't know if that is the only one. In the following code from einstellungen_t::rdwr() :
if(file->get_experimental_version() < 6)
{
// Scale the costs to match the scale factor.
cst_multiply_dock *= distance_per_tile;
cst_multiply_station *= distance_per_tile;
cst_multiply_roadstop *= distance_per_tile;
cst_multiply_airterminal *= distance_per_tile;
cst_multiply_post *= distance_per_tile;
cst_signal *= distance_per_tile;
cst_tunnel *= distance_per_tile;
cst_third_rail *= distance_per_tile;
cst_buy_land *= distance_per_tile;
cst_remove_tree *= distance_per_tile;
}
}
else {
// name of stops
set_name_language_iso( umgebung_t::language_iso );
// default AIs active
for( int i=0; i<MAX_PLAYER_COUNT; i++ ) {
if( i<2 ) {
spieler_type[i] = spieler_t::HUMAN;
}
else if( i==3 ) {
spieler_type[i] = spieler_t::AI_P****ENGER;
}
else if( i<8 ) {
spieler_type[i] = spieler_t::AI_GOODS;
}
else {
spieler_type[i] = spieler_t::EMPTY;
}
automaten[i] = false;
p****word[i][0] = 0;
}
}
if(file->get_version()>101000) {
file->rdwr_bool( seperate_halt_capacities, "" );
if(file->get_experimental_version() < 2)
{
// Was pay for total distance.
// Now depracated.
uint8 dummy;
file->rdwr_byte( dummy, "" );
}
file->rdwr_short(starting_month, "");
file->rdwr_short( river_number, "" );
file->rdwr_short( min_river_length, "" );
file->rdwr_short( max_river_length, "" );
}
if(file->get_version()>102000) {
file->rdwr_bool( avoid_overcrowding, "" );
}
if(file->get_version()>102001)
{
bool dummy;
file->rdwr_bool(dummy, "" );
file->rdwr_bool( with_private_paks, "" );
}
if(file->get_experimental_version() >= 1)
{
file->rdwr_short(min_bonus_max_distance, "");
file->rdwr_short(max_bonus_min_distance, "");
if(file->get_experimental_version() == 1)
{
uint16 dummy;
file->rdwr_short(dummy, "");
}
else
{
file->rdwr_short(median_bonus_distance, "");
file->rdwr_short(max_bonus_multiplier_percent, "");
uint16 distance_per_tile_integer = distance_per_tile * 100.0F;
file->rdwr_short(distance_per_tile_integer, "");
if(file->get_experimental_version() < 5)
{
// In earlier versions, the default was set to a higher level. This
// is a problem when the new journey time tolerance features is used.
distance_per_tile = (distance_per_tile_integer * 2) / 2.5;
}
distance_per_tile = distance_per_tile_integer / 100.0F;
if(file->get_experimental_version() < 6)
{
min_bonus_max_distance /= distance_per_tile;
max_bonus_min_distance /= distance_per_tile;
}
distance_per_tile is used even before it is loaded fom the save game. The code for adjusting the various costs are in the toppest portion of the quoted code, but distance_per_tile is not loaded until the bottomest portion. To fix it, please move all the cost adjustments to the last IF block in the quoted code.
Knightly