mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #3079 from Wirlie/develop
Fix a miscalculation on the track cost (Fixes #3074)
This commit is contained in:
commit
fc2d48d0bb
|
@ -59,6 +59,7 @@ Includes all git commit authors. Aliases are GitHub user names.
|
|||
* Lucas Riutzel (jackinloadup)
|
||||
* Youngjae Yu (YJSoft)
|
||||
* Chanwoong Kim (kexplo)
|
||||
* Josué Acevedo (Wirlie)
|
||||
|
||||
## Toolchain
|
||||
* (Balletie) - OSX
|
||||
|
|
|
@ -4719,7 +4719,8 @@ static money32 track_place(int rideIndex, int type, int originX, int originY, in
|
|||
support_height = 10;
|
||||
}
|
||||
|
||||
cost += (support_height / 2) * RCT2_ADDRESS(0x0097DD7A, uint16)[ride->type * 2];
|
||||
cost += (((support_height / 2) * RCT2_ADDRESS(0x0097DD7A, uint16)[ride->type * 2]) / 2) * 10;
|
||||
|
||||
//6c56d3
|
||||
|
||||
if (!(flags & GAME_COMMAND_FLAG_APPLY))
|
||||
|
@ -4864,7 +4865,7 @@ static money32 track_place(int rideIndex, int type, int originX, int originY, in
|
|||
RCT2_ADDRESS(0x0099DA34, money32)[type];
|
||||
|
||||
price >>= 16;
|
||||
price = ((cost + price) / 2) * 10;
|
||||
price = cost + ((price / 2) * 10);
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) {
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue