ai/default/default.c
branch0.4
changeset 10018 ea16b153cdbb
parent 9959 984493ab6fff
child 10033 cce7f27e214d
equal deleted inserted replaced
10017:e42ff33e973f 10018:ea16b153cdbb
  1618 				}
  1618 				}
  1619 			}
  1619 			}
  1620 
  1620 
  1621 			/* signals too? */
  1621 			/* signals too? */
  1622 			if (j&3) {
  1622 			if (j&3) {
  1623 				// Can't build signals on a road.
  1623 				/* XXX - we need to check manually whether we can build a signal if DC_EXEC is
  1624 				if (IsTileType(c, MP_STREET)) return CMD_ERROR;
  1624 				   not set because the rail has not actually been built */
       
  1625 				if (!IsTileType(c, MP_RAILWAY)) return CMD_ERROR;
  1625 
  1626 
  1626 				if (flag & DC_EXEC) {
  1627 				if (flag & DC_EXEC) {
  1627 					j = 4 - j;
  1628 					j = 4 - j;
  1628 					do {
  1629 					do {
  1629 						ret = DoCommandByTile(c, k, 0, flag, CMD_BUILD_SIGNALS);
  1630 						ret = DoCommandByTile(c, k, 0, flag, CMD_BUILD_SIGNALS);