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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user