water_cmd.c
changeset 1980 9ea0c89fbb58
parent 1977 4392ae3d8e31
child 1981 de031d2aed47
equal deleted inserted replaced
1979:f4462d4e8e62 1980:9ea0c89fbb58
    36 
    36 
    37 	SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
    37 	SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
    38 
    38 
    39 	if (p1 > 3) return CMD_ERROR;
    39 	if (p1 > 3) return CMD_ERROR;
    40 
    40 
    41 	tile = TILE_FROM_XY(x,y);
    41 	tile = TileVirtXY(x, y);
    42 	if (!EnsureNoVehicle(tile)) return CMD_ERROR;
    42 	if (!EnsureNoVehicle(tile)) return CMD_ERROR;
    43 
    43 
    44 	tile2 = tile + (p1 ? TILE_XY(0,1) : TILE_XY(1,0));
    44 	tile2 = tile + (p1 ? TILE_XY(0,1) : TILE_XY(1,0));
    45 	if (!EnsureNoVehicle(tile2)) return CMD_ERROR;
    45 	if (!EnsureNoVehicle(tile2)) return CMD_ERROR;
    46 
    46 
   164  * @param p1 unused
   164  * @param p1 unused
   165  * @param p2 unused
   165  * @param p2 unused
   166  */
   166  */
   167 int32 CmdBuildLock(int x, int y, uint32 flags, uint32 p1, uint32 p2)
   167 int32 CmdBuildLock(int x, int y, uint32 flags, uint32 p1, uint32 p2)
   168 {
   168 {
   169 	TileIndex tile = TILE_FROM_XY(x,y);
   169 	TileIndex tile = TileVirtXY(x, y);
   170 	uint tileh;
   170 	uint tileh;
   171 
   171 
   172 	SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
   172 	SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
   173 	tileh = GetTileSlope(tile, NULL);
   173 	tileh = GetTileSlope(tile, NULL);
   174 
   174