mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-04 13:42:55 +01:00
* Fix #8248: Invalid tile element in footpath_element_insert * Update Footpath.cpp
This commit is contained in:
committed by
GitHub
parent
6deb5daf86
commit
7582afe0b4
@@ -247,6 +247,11 @@ static money32 footpath_element_insert(
|
||||
|
||||
tileElement = map_get_surface_element_at({ x, y });
|
||||
|
||||
if (tileElement == nullptr)
|
||||
{
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
int32_t supportHeight = z - tileElement->base_height;
|
||||
gFootpathPrice += supportHeight < 0 ? MONEY(20, 00) : (supportHeight / 2) * MONEY(5, 00);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user