mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 18:31:59 -05:00
Close #9104: Calculate maze support costs
This commit is contained in:
parent
5c596eae5d
commit
f7c769603b
4 changed files with 9 additions and 4 deletions
|
@ -10,6 +10,7 @@
|
||||||
- Improved: [#15358] Park and scenario names can now contain up to 128 characters.
|
- Improved: [#15358] Park and scenario names can now contain up to 128 characters.
|
||||||
- Improved: [#16840] Add support for rectangular heightmaps.
|
- Improved: [#16840] Add support for rectangular heightmaps.
|
||||||
- Improved: [#17575] You can now search for Authors in Object Selection.
|
- Improved: [#17575] You can now search for Authors in Object Selection.
|
||||||
|
- Change: [#9104] Calculate maze support costs.
|
||||||
- Change: [#17319] Giant screenshots are now cropped to the horizontal view-clipping selection.
|
- Change: [#17319] Giant screenshots are now cropped to the horizontal view-clipping selection.
|
||||||
- Change: [#17499] Update error text when using vehicle incompatible with TD6 and add error when using incompatible track elements.
|
- Change: [#17499] Update error text when using vehicle incompatible with TD6 and add error when using incompatible track elements.
|
||||||
- Change: [#17655] Lower default price for the Crooked House.
|
- Change: [#17655] Lower default price for the Crooked House.
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
// This string specifies which version of network stream current build uses.
|
// This string specifies which version of network stream current build uses.
|
||||||
// It is used for making sure only compatible builds get connected, even within
|
// It is used for making sure only compatible builds get connected, even within
|
||||||
// single OpenRCT2 version.
|
// single OpenRCT2 version.
|
||||||
#define NETWORK_STREAM_VERSION "7"
|
#define NETWORK_STREAM_VERSION "8"
|
||||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||||
|
|
||||||
static Peep* _pickup_peep = nullptr;
|
static Peep* _pickup_peep = nullptr;
|
||||||
|
|
|
@ -197,10 +197,14 @@ TRACK_PAINT_FUNCTION get_track_paint_function_maze(int32_t trackType)
|
||||||
return maze_paint_setup;
|
return maze_paint_setup;
|
||||||
}
|
}
|
||||||
|
|
||||||
money64 MazeCalculateCost(money32 constructionCost, const Ride& ride)
|
money64 MazeCalculateCost(money32 constructionCost, const Ride& ride, const CoordsXYZ& _loc)
|
||||||
{
|
{
|
||||||
const auto& ted = GetTrackElementDescriptor(TrackElemType::Maze);
|
const auto& ted = GetTrackElementDescriptor(TrackElemType::Maze);
|
||||||
money64 price = (ride.GetRideTypeDescriptor().BuildCosts.TrackPrice * ted.PriceModifier) >> 16;
|
money64 price = (ride.GetRideTypeDescriptor().BuildCosts.TrackPrice * ted.PriceModifier) >> 16;
|
||||||
|
|
||||||
return constructionCost + price;
|
auto surfaceElement = map_get_surface_element_at(_loc);
|
||||||
|
auto heightDifference = (_loc.z - surfaceElement->GetBaseZ()) / COORDS_Z_PER_TINY_Z;
|
||||||
|
money64 supportCost = heightDifference * ride.GetRideTypeDescriptor().BuildCosts.SupportPrice;
|
||||||
|
|
||||||
|
return constructionCost + price + supportCost;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,4 +11,4 @@
|
||||||
|
|
||||||
#include "../RideData.h"
|
#include "../RideData.h"
|
||||||
|
|
||||||
money64 MazeCalculateCost(money32 constructionCost, const Ride& ride);
|
money64 MazeCalculateCost(money32 constructionCost, const Ride& ride, const CoordsXYZ& _loc);
|
||||||
|
|
Loading…
Reference in a new issue