(svn r12138) -Fix: do not allow adding tram to rail-road crossing when there is a vehicle on it
authorsmatz
Thu, 14 Feb 2008 10:19:16 +0000
changeset 9056 613efc3d2ddb
parent 9055 386250fe46b2
child 9057 f9931abf5f55
(svn r12138) -Fix: do not allow adding tram to rail-road crossing when there is a vehicle on it
src/road_cmd.cpp
--- a/src/road_cmd.cpp	Thu Feb 14 07:25:24 2008 +0000
+++ b/src/road_cmd.cpp	Thu Feb 14 10:19:16 2008 +0000
@@ -458,6 +458,7 @@
 					if (HasBit(GetRoadTypes(tile), rt)) return_cmd_error(STR_1007_ALREADY_BUILT);
 					all_bits = GetCrossingRoadBits(tile);
 					if (pieces & ComplementRoadBits(all_bits)) goto do_clear;
+					if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
 					break;
 
 				default: