mirror of https://github.com/OpenTTD/OpenTTD
(svn r8851) -Fix [FS#643] (r8735): crash on removing town owned roads outside of the local authority.
parent
89613b6cc4
commit
dcb217a6ac
|
@ -1348,7 +1348,7 @@ int32 CmdRemoveRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||||
Owner cur_owner = _current_player;
|
Owner cur_owner = _current_player;
|
||||||
|
|
||||||
if (is_towns_road) {
|
if (is_towns_road) {
|
||||||
index = ClosestTownFromTile(tile, _patches.dist_local_authority)->index;
|
index = ClosestTownFromTile(tile, (uint)-1)->index;
|
||||||
_current_player = OWNER_TOWN;
|
_current_player = OWNER_TOWN;
|
||||||
}
|
}
|
||||||
DoCommand(tile, road_bits, index, DC_EXEC, CMD_BUILD_ROAD);
|
DoCommand(tile, road_bits, index, DC_EXEC, CMD_BUILD_ROAD);
|
||||||
|
|
Loading…
Reference in New Issue