1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 23:04:36 +01:00

Rework and refactor PathBitEntry (#14809)

This commit is contained in:
Duncan
2021-06-03 21:23:00 +01:00
committed by GitHub
parent 425f968a67
commit 6f81248084
18 changed files with 107 additions and 107 deletions

View File

@@ -185,13 +185,13 @@ GameActions::Result::Ptr FootpathPlaceAction::ElementUpdateExecute(PathElement*
bool isQueue = _type & FOOTPATH_ELEMENT_INSERT_QUEUE;
pathElement->SetIsQueue(isQueue);
rct_scenery_entry* elem = pathElement->GetAdditionEntry();
auto* elem = pathElement->GetAdditionEntry();
if (elem != nullptr)
{
if (isQueue)
{
// remove any addition that isn't a TV or a lamp
if ((elem->path_bit.flags & PATH_BIT_FLAG_IS_QUEUE_SCREEN) == 0 && (elem->path_bit.flags & PATH_BIT_FLAG_LAMP) == 0)
if ((elem->flags & PATH_BIT_FLAG_IS_QUEUE_SCREEN) == 0 && (elem->flags & PATH_BIT_FLAG_LAMP) == 0)
{
pathElement->SetIsBroken(false);
pathElement->SetAddition(0);
@@ -200,7 +200,7 @@ GameActions::Result::Ptr FootpathPlaceAction::ElementUpdateExecute(PathElement*
else
{
// remove all TVs
if ((elem->path_bit.flags & PATH_BIT_FLAG_IS_QUEUE_SCREEN) != 0)
if ((elem->flags & PATH_BIT_FLAG_IS_QUEUE_SCREEN) != 0)
{
pathElement->SetIsBroken(false);
pathElement->SetAddition(0);