Merge branch 'save_ext' into jgrpp
# Conflicts: # config.lib # src/misc_gui.cpp # src/network/network_gui.cpp # src/settings_type.h # src/smallmap_gui.cpp # src/smallmap_gui.h # src/station_cmd.cpp # src/toolbar_gui.cpp # src/vehicle_gui.cpp # src/window.cpp
This commit is contained in:
@@ -375,7 +375,7 @@ static CommandCost RemoveRoad(TileIndex tile, DoCommandFlag flags, RoadBits piec
|
||||
if (rt == ROADTYPE_ROAD && IsRoadOwner(tile, ROADTYPE_ROAD, OWNER_TOWN)) {
|
||||
/* Update nearest-town index */
|
||||
const Town *town = CalcClosestTownFromTile(tile);
|
||||
SetTownIndex(tile, town == NULL ? (TownID)INVALID_TOWN : town->index);
|
||||
SetTownIndex(tile, town == NULL ? INVALID_TOWN : town->index);
|
||||
}
|
||||
SetRoadBits(tile, ROAD_NONE, rt);
|
||||
SetRoadTypes(tile, rts);
|
||||
@@ -537,7 +537,7 @@ CommandCost CmdBuildRoad(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
if ((Company::IsValidID(company) && p2 != 0) || (company == OWNER_TOWN && !Town::IsValidID(p2)) || (company == OWNER_DEITY && p2 != 0)) return CMD_ERROR;
|
||||
if (company != OWNER_TOWN) {
|
||||
const Town *town = CalcClosestTownFromTile(tile);
|
||||
p2 = (town != NULL) ? town->index : (TownID)INVALID_TOWN;
|
||||
p2 = (town != NULL) ? town->index : INVALID_TOWN;
|
||||
|
||||
if (company == OWNER_DEITY) {
|
||||
company = OWNER_TOWN;
|
||||
@@ -1569,7 +1569,7 @@ void UpdateNearestTownForRoadTiles(bool invalidate)
|
||||
|
||||
for (TileIndex t = 0; t < MapSize(); t++) {
|
||||
if (IsTileType(t, MP_ROAD) && !IsRoadDepot(t) && !HasTownOwnedRoad(t)) {
|
||||
TownID tid = (TownID)INVALID_TOWN;
|
||||
TownID tid = INVALID_TOWN;
|
||||
if (!invalidate) {
|
||||
const Town *town = CalcClosestTownFromTile(t);
|
||||
if (town != NULL) tid = town->index;
|
||||
|
Reference in New Issue
Block a user