diff --git a/src/economy.cpp b/src/economy.cpp --- a/src/economy.cpp +++ b/src/economy.cpp @@ -833,7 +833,7 @@ void ResetEconomy() bool needed = false; for (CargoID c = 0; c < NUM_CARGO; c++) { - const CargoSpec *cs = GetCargo(c); + const CargoSpec *cs = CargoSpec::Get(c); if (!cs->IsValid()) continue; if (_cargo_payment_rates[c] == 0) { needed = true; @@ -866,7 +866,7 @@ Money GetPriceByIndex(uint8 index) Money GetTransportedGoodsIncome(uint num_pieces, uint dist, byte transit_days, CargoID cargo_type) { - const CargoSpec *cs = GetCargo(cargo_type); + const CargoSpec *cs = CargoSpec::Get(cargo_type); /* Use callback to calculate cargo profit, if available */ if (HasBit(cs->callback_mask, CBM_CARGO_PROFIT_CALC)) { @@ -1089,7 +1089,7 @@ static Money DeliverGoods(int num_pieces } /* Increase town's counter for some special goods types */ - const CargoSpec *cs = GetCargo(cargo_type); + const CargoSpec *cs = CargoSpec::Get(cargo_type); if (cs->town_effect == TE_FOOD) s_to->town->new_act_food += num_pieces; if (cs->town_effect == TE_WATER) s_to->town->new_act_water += num_pieces;