1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 04:23:20 +01:00

Correctly import ride profits

This commit is contained in:
Gymnasiast
2021-05-09 19:44:58 +02:00
parent a3c9a513af
commit 1c5b7a7bdd
4 changed files with 10 additions and 10 deletions

View File

@@ -987,10 +987,10 @@ private:
dst->upkeep_cost = src->upkeep_cost;
dst->price[0] = src->price;
dst->price[1] = src->price_secondary;
dst->income_per_hour = src->income_per_hour;
dst->income_per_hour = ToMoney64(src->income_per_hour);
dst->total_customers = src->total_customers;
dst->profit = src->profit;
dst->total_profit = src->total_profit;
dst->profit = ToMoney64(src->profit);
dst->total_profit = ToMoney64(src->total_profit);
dst->value = src->value;
for (size_t i = 0; i < std::size(src->num_customers); i++)
{

View File

@@ -697,7 +697,7 @@ public:
// pad_14E[0x02];
dst->total_customers = src->total_customers;
dst->total_profit = src->total_profit;
dst->total_profit = ToMoney64(src->total_profit);
dst->popularity = src->popularity;
dst->popularity_time_out = src->popularity_time_out;
dst->popularity_next = src->popularity_next;
@@ -748,8 +748,8 @@ public:
dst->last_crash_type = src->last_crash_type;
dst->connected_message_throttle = src->connected_message_throttle;
dst->income_per_hour = src->income_per_hour;
dst->profit = src->profit;
dst->income_per_hour = ToMoney64(src->income_per_hour);
dst->profit = ToMoney64(src->profit);
for (uint8_t i = 0; i < RCT12_NUM_COLOUR_SCHEMES; i++)
{

View File

@@ -382,7 +382,7 @@ void ride_update_favourited_stat()
*
* rct2: 0x006AC3AB
*/
money32 Ride::CalculateIncomePerHour() const
money64 Ride::CalculateIncomePerHour() const
{
// Get entry by ride to provide better reporting
rct_ride_entry* entry = GetRideEntry();
@@ -390,8 +390,8 @@ money32 Ride::CalculateIncomePerHour() const
{
return 0;
}
money32 customersPerHour = ride_customers_per_hour(this);
money32 priceMinusCost = ride_get_price(this);
auto customersPerHour = ride_customers_per_hour(this);
money64 priceMinusCost = ride_get_price(this);
ShopItem currentShopItem = entry->shop_item[0];
if (currentShopItem != ShopItem::None)

View File

@@ -390,7 +390,7 @@ private:
void UpdateQueueLength(StationIndex stationIndex);
bool CreateVehicles(const CoordsXYE& element, bool isApplying);
void MoveTrainsToBlockBrakes(TrackElement* firstBlock);
money32 CalculateIncomePerHour() const;
money64 CalculateIncomePerHour() const;
void ChainQueues() const;
void ConstructMissingEntranceOrExit() const;