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

Correctly import ride profits

This commit is contained in:
Gymnasiast
2021-05-09 19:44:58 +02:00
parent 74de598cc0
commit 8af70cf402
4 changed files with 10 additions and 10 deletions

View File

@@ -958,10 +958,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

@@ -704,7 +704,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;
@@ -755,8 +755,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

@@ -337,7 +337,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();
@@ -345,8 +345,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

@@ -393,7 +393,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;