| Old revision #pqdzxhpel | New revision #phluxcqwo | ||
|---|---|---|---|
| 8 | 8 | ||
| 9 | + /* While it's true Industry Tiles don't have any owner, the following | 9 | + /* While it's true Industry Tiles don't have any owner, the following |
| 10 | + DoCommand below is inadvertently setting bit 4 of m1 to 1. To preserve its | 10 | + DoCommand below is inadvertently setting bit 4 of m1 to 1. To preserve its |
| 11 | + original value, store | 11 | + original value, store it first before executing DoCommand, then restore it |
| 12 | + | 12 | + before MakeIndustry takes action. */ |
| 13 | + Owner old_owner = GetTileOwner(cur_tile); | 13 | + Owner old_owner = GetTileOwner(cur_tile); |
| 14 | DoCommand(cur_tile, 0, 0, DC_EXEC | DC_NO_TEST_TOWN_RATING | DC_NO_MODIFY_TOWN_RATING, CMD_LANDSCAPE_CLEAR); | 14 | DoCommand(cur_tile, 0, 0, DC_EXEC | DC_NO_TEST_TOWN_RATING | DC_NO_MODIFY_TOWN_RATING, CMD_LANDSCAPE_CLEAR); |
| 15 | - | 15 | - | … | … |
| 34 | =================================================================== | 34 | =================================================================== |
| 35 | --- src/saveload/afterload.cpp (revision 27171) | 35 | --- src/saveload/afterload.cpp (revision 27171) |
| 36 | +++ src/saveload/afterload.cpp (working copy) | 36 | +++ src/saveload/afterload.cpp (working copy) |
| 37 | @@ -2950,6 +2950,18 @@ | 37 | @@ -2985,6 +2985,16 @@ |
| 38 | } | 38 | ResetSignalHandlers(); |
| 39 | } | ||
| 40 | 39 | ||
| 41 | + | 40 | AfterLoadLinkGraphs(); |
| 41 | + | ||
| 42 | + /* Convert m1 bit 4 value for all industry tiles */ | 42 | + /* Convert m1 bit 4 value for all industry tiles */ |
| 43 | + for (TileIndex t = 0; t < map_size; t++) { | 43 | + for (TileIndex t = 0; t < map_size; t++) { |
| 44 | + /* It's not possible to know who was the original owner of a canal tile built under | 44 | + /* It's not possible to know who was the original owner of a canal tile built under | … | … |
| 48 | + SB(_m[t].m1, 4, 1, 1); | 48 | + SB(_m[t].m1, 4, 1, 1); |
| 49 | + } | 49 | + } |
| 50 | + } | 50 | + } |
| 51 | + | 51 | return true; |
| 52 | + | 52 | } |
| 53 | /* | ||
| 54 | * Only keep order-backups for network clients. | ||
| 55 | * If we are a network server or not networking, then we just loaded a previously | ||