mirror of https://github.com/OpenTTD/OpenTTD
(svn r4585) - Fix [FS#130] - Obscure road dragging bug. The road build command did not return the appropiate error message of invalid-slope when building road.
parent
6a31b30a20
commit
939dd7d2bf
|
@ -386,10 +386,11 @@ do_clear:;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = CheckRoadSlope(tileh, &pieces, existing);
|
ret = CheckRoadSlope(tileh, &pieces, existing);
|
||||||
if (CmdFailed(ret)) return_cmd_error(STR_1000_LAND_SLOPED_IN_WRONG_DIRECTION);
|
/* Return an error if we need to build a foundation (ret != 0) but the
|
||||||
if (ret != 0 && (!_patches.build_on_slopes || _is_old_ai_player)) {
|
* current patch-setting is turned off (or stupid AI@work) */
|
||||||
return CMD_ERROR;
|
if (CmdFailed(ret) || ret != 0 && (!_patches.build_on_slopes || _is_old_ai_player))
|
||||||
}
|
return_cmd_error(STR_1000_LAND_SLOPED_IN_WRONG_DIRECTION);
|
||||||
|
|
||||||
cost += ret;
|
cost += ret;
|
||||||
|
|
||||||
if (IsTileType(tile, MP_STREET)) {
|
if (IsTileType(tile, MP_STREET)) {
|
||||||
|
|
Loading…
Reference in New Issue