mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 03:53:07 +01:00
Do not return money when demolishing a ghost footpath, fixes #5318
This commit is contained in:
committed by
Michael Steenbeek
parent
b5b602d5a0
commit
2ce4b51528
@@ -55,7 +55,7 @@ extern "C" {
|
||||
// This define specifies which version of network stream current build uses.
|
||||
// It is used for making sure only compatible builds get connected, even within
|
||||
// single OpenRCT2 version.
|
||||
#define NETWORK_STREAM_VERSION "9"
|
||||
#define NETWORK_STREAM_VERSION "10"
|
||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -449,7 +449,17 @@ money32 footpath_remove_real(sint32 x, sint32 y, sint32 z, sint32 flags)
|
||||
sub_6A759F();
|
||||
}
|
||||
|
||||
return (flags & (1 << 5)) || (gParkFlags & PARK_FLAGS_NO_MONEY) ? 0 : -MONEY(10,00);
|
||||
money32 cost = -MONEY(10,00);
|
||||
|
||||
bool isNotOwnedByPark = (flags & (1 << 5));
|
||||
bool moneyDisabled = (gParkFlags & PARK_FLAGS_NO_MONEY);
|
||||
bool isGhost = map_element_is_ghost(mapElement);
|
||||
|
||||
if (isNotOwnedByPark || moneyDisabled || isGhost) {
|
||||
cost = 0;
|
||||
}
|
||||
|
||||
return cost;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user