diff options
author | Darkvater <darkvater@openttd.org> | 2006-03-15 21:27:19 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-03-15 21:27:19 +0000 |
commit | 748d082a7932fcf83e01db6040bdf02d819c2ecf (patch) | |
tree | d0e05fc1051ce979b584ab2f173ea4a7fb64b030 /rail_cmd.c | |
parent | c51c86b2c8e4d456b42330122ad4852d772463cd (diff) | |
download | openttd-748d082a7932fcf83e01db6040bdf02d819c2ecf.tar.xz |
(svn r3893) - Fix: Properly set back the owner of a crossing/road-under bridge after removing it. For crossings we can always use .m2 because it is already 0 when not owned by a town.
Diffstat (limited to 'rail_cmd.c')
-rw-r--r-- | rail_cmd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/rail_cmd.c b/rail_cmd.c index 7c8468034..61b5d3f07 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -427,7 +427,6 @@ int32 CmdRemoveSingleRail(int x, int y, uint32 flags, uint32 p1, uint32 p2) break; case MP_STREET: { - uint town; if (!IsLevelCrossing(tile)) return CMD_ERROR; /* This is a crossing, let's check if the direction is correct */ @@ -436,8 +435,7 @@ int32 CmdRemoveSingleRail(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (!(flags & DC_EXEC)) return _price.remove_rail; - town = (_m[tile].m3 == OWNER_TOWN) ? _m[tile].m2 : 0; - MakeRoadNormal(tile, _m[tile].m3, GetCrossingRoadBits(tile), town); + MakeRoadNormal(tile, _m[tile].m3, GetCrossingRoadBits(tile), _m[tile].m2); break; } |