Kantorovich potentials and continuity of total cost for relativistic cost functions