mirror of https://github.com/OpenTTD/OpenTTD
(svn r11565) -Revert: part of r11564
parent
82913a2134
commit
05fca79cf0
|
@ -1646,18 +1646,22 @@ clear_town_stuff:;
|
||||||
rating += _cleared_town_rating;
|
rating += _cleared_town_rating;
|
||||||
}
|
}
|
||||||
} else if (p->mode == 2) {
|
} else if (p->mode == 2) {
|
||||||
// Rail
|
/* Rail */
|
||||||
if (IsTileType(c, MP_RAILWAY)) return CMD_ERROR;
|
if (IsTileType(c, MP_RAILWAY)) return CMD_ERROR;
|
||||||
|
|
||||||
j = p->attr;
|
j = p->attr;
|
||||||
k = 0;
|
k = 0;
|
||||||
|
|
||||||
// Build the rail
|
/* Build the rail
|
||||||
FOR_EACH_SET_BIT(i, j) {
|
* note: FOR_EACH_SET_BIT cannot be used here
|
||||||
k = i;
|
*/
|
||||||
ret = DoCommand(c, railtype, i, flag | DC_AUTO | DC_NO_WATER, CMD_BUILD_SINGLE_RAIL);
|
for (i = 0; i != 6; i++, j >>= 1) {
|
||||||
if (CmdFailed(ret)) return CMD_ERROR;
|
if (j & 1) {
|
||||||
total_cost.AddCost(ret);
|
k = i;
|
||||||
|
ret = DoCommand(c, railtype, i, flag | DC_AUTO | DC_NO_WATER, CMD_BUILD_SINGLE_RAIL);
|
||||||
|
if (CmdFailed(ret)) return CMD_ERROR;
|
||||||
|
total_cost.AddCost(ret);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* signals too? */
|
/* signals too? */
|
||||||
|
|
Loading…
Reference in New Issue