equal
deleted
inserted
replaced
175 // There is already some road, and it is a bridge.. don't build!!! |
175 // There is already some road, and it is a bridge.. don't build!!! |
176 if (!IS_TILETYPE(route[part], MP_TUNNELBRIDGE)) { |
176 if (!IS_TILETYPE(route[part], MP_TUNNELBRIDGE)) { |
177 // Build the tile |
177 // Build the tile |
178 res = DoCommandByTile(route[part], dir, 0, flag | DC_NO_WATER, CMD_BUILD_ROAD); |
178 res = DoCommandByTile(route[part], dir, 0, flag | DC_NO_WATER, CMD_BUILD_ROAD); |
179 // Currently, we ignore CMD_ERRORs! |
179 // Currently, we ignore CMD_ERRORs! |
180 if (res == CMD_ERROR && !IS_TILETYPE(route[part], MP_STREET) && (flag == DC_EXEC && !EnsureNoVehicle(route[part]))) { |
180 if (res == CMD_ERROR && flag == DC_EXEC && !IS_TILETYPE(route[part], MP_STREET) && !EnsureNoVehicle(route[part])) { |
181 // Problem.. let's just abort it all! |
181 // Problem.. let's just abort it all! |
182 DEBUG(ai,0)("Darn, the route could not be builded.. aborting!"); |
182 DEBUG(ai,0)("Darn, the route could not be builded.. aborting!"); |
183 p->ainew.state = AI_STATE_NOTHING; |
183 p->ainew.state = AI_STATE_NOTHING; |
184 return 0; |
184 return 0; |
185 } else { |
185 } else { |