roadveh_cmd.c
changeset 4544 69f1248a2d97
parent 4529 18bd5e7e35aa
child 4546 507b7d9bd834
equal deleted inserted replaced
4543:e17ae1c10892 4544:69f1248a2d97
  1836 	}
  1836 	}
  1837 	_returned_refit_capacity = capacity;
  1837 	_returned_refit_capacity = capacity;
  1838 
  1838 
  1839 	cost = 0;
  1839 	cost = 0;
  1840 	if (IS_HUMAN_PLAYER(v->owner) && new_cid != v->cargo_type) {
  1840 	if (IS_HUMAN_PLAYER(v->owner) && new_cid != v->cargo_type) {
  1841 		cost = (EngInfo(v->engine_type)->refit_cost * _price.roadveh_base) >> 10;
  1841 		cost = GetRefitCost(v->engine_type);
  1842 	}
  1842 	}
  1843 
  1843 
  1844 	if (flags & DC_EXEC) {
  1844 	if (flags & DC_EXEC) {
  1845 		v->cargo_cap = capacity;
  1845 		v->cargo_cap = capacity;
  1846 		v->cargo_count = (v->cargo_type == new_cid) ? min(capacity, v->cargo_count) : 0;
  1846 		v->cargo_count = (v->cargo_type == new_cid) ? min(capacity, v->cargo_count) : 0;