diff --git a/src/object_gui.cpp b/src/object_gui.cpp index e18f6c4f92..241fcdca62 100644 --- a/src/object_gui.cpp +++ b/src/object_gui.cpp @@ -326,7 +326,7 @@ public: for (uint i = 0; i < ObjectClass::GetCount(_selected_object_class); i++) { const ObjectSpec *spec = ObjectClass::Get(_selected_object_class, i); if (spec->IsAvailable()) { - this->SelectOtherObject(0); + this->SelectOtherObject(i); return; } } diff --git a/src/openttd.cpp b/src/openttd.cpp index 3c8047b269..7f3c4283d9 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -426,6 +426,8 @@ struct AfterNewGRFScan : NewGRFScanCallback { /* We have loaded the config, so we may possibly save it. */ *save_config_ptr = save_config; + /* restore saved music volume */ + _music_driver->SetVolume(_settings_client.music.music_vol); if (startyear != INVALID_YEAR) _settings_newgame.game_creation.starting_year = startyear; if (generation_seed != GENERATE_NEW_SEED) _settings_newgame.game_creation.generation_seed = generation_seed; @@ -812,9 +814,6 @@ int ttd_main(int argc, char *argv[]) } free(musicdriver); - /* restore saved music volume */ - _music_driver->SetVolume(_settings_client.music.music_vol); - /* Take our initial lock on whatever we might want to do! */ _modal_progress_paint_mutex->BeginCritical(); _modal_progress_work_mutex->BeginCritical(); diff --git a/src/subsidy.cpp b/src/subsidy.cpp index 465a595602..d4a102f465 100644 --- a/src/subsidy.cpp +++ b/src/subsidy.cpp @@ -336,6 +336,9 @@ bool FindSubsidyTownCargoRoute() /* Passenger subsidies are not handled here. */ ClrBit(town_cargo_produced, CT_PASSENGERS); + /* No cargo produced at all? */ + if (town_cargo_produced == 0) return false; + /* Choose a random cargo that is produced in the town. */ uint8 cargo_number = RandomRange(CountBits(town_cargo_produced)); CargoID cid; diff --git a/src/table/town_land.h b/src/table/town_land.h index b7cda0aef5..91f37fde05 100644 --- a/src/table/town_land.h +++ b/src/table/town_land.h @@ -1174,7 +1174,7 @@ static const DrawBuildingsTileStruct _town_draw_tile_data[] = { M( SPR_FLAT_BARE_LAND, PAL_NONE, 0x117d, PALETTE_TO_STRUCT_BROWN, 0, 0, 16, 16, 50, 0), M( SPR_FLAT_BARE_LAND, PAL_NONE, 0x117e, PALETTE_TO_STRUCT_BROWN, 0, 0, 16, 16, 50, 0), M( SPR_FLAT_BARE_LAND, PAL_NONE, 0x11e1, PALETTE_TO_STRUCT_BROWN, 0, 0, 16, 16, 50, 0), - M( SPR_CONCRETE_GROUND,PAL_NONE, 0x11e3, PALETTE_TO_STRUCT_BROWN, 0, 0, 16, 16, 50, 0), + M( SPR_CONCRETE_GROUND,PAL_NONE, 0x11e1, PALETTE_TO_STRUCT_BROWN, 0, 0, 16, 16, 50, 0), M( SPR_FLAT_BARE_LAND, PAL_NONE, 0x117d, PALETTE_TO_STRUCT_WHITE, 0, 0, 16, 16, 50, 0), M( SPR_FLAT_BARE_LAND, PAL_NONE, 0x117e, PALETTE_TO_STRUCT_WHITE, 0, 0, 16, 16, 50, 0), M( SPR_FLAT_BARE_LAND, PAL_NONE, 0x11e1, PALETTE_TO_STRUCT_WHITE, 0, 0, 16, 16, 50, 0),