Changeset - r12618:f5950d19ae82
[Not reviewed]
master
0 1 0
smatz - 15 years ago 2009-08-05 14:33:30
smatz@openttd.org
(svn r17071) -Fix: give a better error message when trying to make road one-way when it doesn't belong to you
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/road_cmd.cpp
Show inline comments
 
@@ -489,9 +489,12 @@ CommandCost CmdBuildRoad(TileIndex tile,
 
					}
 
					if ((existing & pieces) == pieces) {
 
						/* We only want to set the (dis)allowed road directions */
 
						if (toggle_drd != DRD_NONE && rt != ROADTYPE_TRAM && IsRoadOwner(tile, ROADTYPE_ROAD, _current_company)) {
 
						if (toggle_drd != DRD_NONE && rt != ROADTYPE_TRAM) {
 
							if (crossing) return_cmd_error(STR_ERROR_ONEWAY_ROADS_CAN_T_HAVE_JUNCTION);
 

	
 
							Owner owner = GetRoadOwner(tile, ROADTYPE_ROAD);
 
							if (owner != OWNER_NONE && !CheckOwnership(owner)) return CMD_ERROR;
 

	
 
							if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
 

	
 
							/* Ignore half built tiles */
0 comments (0 inline, 0 general)