Changeset - r3208:184643cf34bf
[Not reviewed]
master
0 1 0
Darkvater - 19 years ago 2006-03-14 23:28:04
darkvater@openttd.org
(svn r3876) - Fix: We know on a level crossing's town owner of the road (if any); it is in m2 so properly set it back when the crossing's removed.
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rail_cmd.c
Show inline comments
 
@@ -424,21 +424,23 @@ int32 CmdRemoveSingleRail(int x, int y, 
 
				return _price.remove_rail;
 

	
 
			SetClearUnderBridge(tile);
 
			break;
 

	
 
		case MP_STREET: {
 
			uint town;
 
			if (!IsLevelCrossing(tile)) return CMD_ERROR;
 

	
 
			/* This is a crossing, let's check if the direction is correct */
 
			if (GetCrossingRailBits(tile) != trackbit) return CMD_ERROR;
 

	
 
			if (!(flags & DC_EXEC))
 
				return _price.remove_rail;
 

	
 
			MakeRoadNormal(tile, _m[tile].m3, GetCrossingRoadBits(tile), 0);
 
			town = (_m[tile].m3 == OWNER_TOWN) ? _m[tile].m2 : 0;
 
			MakeRoadNormal(tile, _m[tile].m3, GetCrossingRoadBits(tile), town);
 
			break;
 
		}
 

	
 
		case MP_RAILWAY:
 
			if (!IsPlainRailTile(tile))
 
				return CMD_ERROR;
0 comments (0 inline, 0 general)