mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-19 21:13:05 +01:00
Make requested fixes
This commit is contained in:
@@ -1058,7 +1058,7 @@ static void repaint_scenery_tool_down(int16_t x, int16_t y, rct_widgetindex widg
|
||||
if (scenery_entry->banner.flags & BANNER_ENTRY_FLAG_HAS_PRIMARY_COLOUR)
|
||||
{
|
||||
auto repaintScenery = BannerSetColourAction(
|
||||
{ grid_x, grid_y, tile_element->base_height * 8, tile_element->AsBanner()->GetPosition()},
|
||||
{ grid_x, grid_y, tile_element->base_height * 8, tile_element->AsBanner()->GetPosition() },
|
||||
gWindowSceneryPrimaryColour);
|
||||
|
||||
GameActions::Execute(&repaintScenery);
|
||||
|
||||
@@ -161,8 +161,8 @@ public:
|
||||
case BannerSetStyleType::NoEntry:
|
||||
{
|
||||
BannerElement* bannerElement = tileElement->AsBanner();
|
||||
banner->flags &= BANNER_FLAG_NO_ENTRY;
|
||||
banner->flags |= BANNER_FLAG_NO_ENTRY & (_parameter != 0);
|
||||
banner->flags &= ~BANNER_FLAG_NO_ENTRY;
|
||||
banner->flags |= (_parameter != 0) ? BANNER_FLAG_NO_ENTRY : 0;
|
||||
uint8_t allowedEdges = 0xF;
|
||||
if (banner->flags & BANNER_FLAG_NO_ENTRY)
|
||||
{
|
||||
|
||||
@@ -130,10 +130,17 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
auto tileElement = map_get_large_scenery_segment(currentTile.x, currentTile.y, _loc.z / 8, _loc.direction, i);
|
||||
|
||||
if (tileElement == nullptr)
|
||||
{
|
||||
log_error(
|
||||
"Large scenery element not found at: x = %d, y = %d, z = %d, direction = %d", _loc.x, _loc.y, _loc.z,
|
||||
_loc.direction);
|
||||
return MakeResult(GA_ERROR::UNKNOWN, STR_CANT_REPAINT_THIS);
|
||||
}
|
||||
if (isExecuting)
|
||||
{
|
||||
auto tileElement = map_get_large_scenery_segment(currentTile.x, currentTile.y, _loc.z / 8, _loc.direction, i);
|
||||
|
||||
tileElement->SetPrimaryColour(_primaryColour);
|
||||
tileElement->SetSecondaryColour(_secondaryColour);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user