1
0
Fork 0

(svn r24227) [1.2] -Backport from trunk:

- Fix: [Squirrel] Crash when trying to create an array with negative size [FS#5160] (r24153)
- Fix: [NoAI] Do not return the last 'cached' speed of vehicles when they are stopped/crashed [FS#5157] (r24152)
- Fix: [Script] Typo in script documentation (r24151)
- Fix: Glass-sprite of bubble-generator was not drawn anymore for completely constructed tiles [FS#5143] (r24107)
release/1.2
rubidium 2012-05-12 07:24:11 +00:00
parent 4e6310d848
commit 0603cd6efc
4 changed files with 7 additions and 5 deletions

View File

@ -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;
}
}

View File

@ -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();

View File

@ -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;

View File

@ -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),