Changeset - r3670:68c4882144aa
[Not reviewed]
master
0 1 0
Darkvater - 18 years ago 2006-04-26 21:44:22
darkvater@openttd.org
(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.
1 file changed with 5 insertions and 4 deletions:
0 comments (0 inline, 0 general)
road_cmd.c
Show inline comments
 
@@ -386,10 +386,11 @@ do_clear:;
 
	}
 

	
 
	ret = CheckRoadSlope(tileh, &pieces, existing);
 
	if (CmdFailed(ret)) return_cmd_error(STR_1000_LAND_SLOPED_IN_WRONG_DIRECTION);
 
	if (ret != 0 && (!_patches.build_on_slopes || _is_old_ai_player)) {
 
		return CMD_ERROR;
 
	}
 
	/* Return an error if we need to build a foundation (ret != 0) but the
 
	 * current patch-setting is turned off (or stupid AI@work) */
 
	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;
 

	
 
	if (IsTileType(tile, MP_STREET)) {
0 comments (0 inline, 0 general)