mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 04:23:20 +01:00
Add method to look up source game
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "../drawing/drawing.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../object.h"
|
||||
#include "../object_list.h"
|
||||
|
||||
void FootpathItemObject::ReadLegacy(IReadObjectContext * context, IStream * stream)
|
||||
{
|
||||
@@ -46,11 +47,11 @@ void FootpathItemObject::ReadLegacy(IReadObjectContext * context, IStream * stre
|
||||
// Add path bits to 'Signs and items for footpaths' group, rather than lumping them in the Miscellaneous tab.
|
||||
// Since this is already done the other way round for original items, avoid adding those to prevent duplicates.
|
||||
const std::string identifier = GetIdentifier();
|
||||
const rct_object_entry * objectEntry = object_list_find_by_name(identifier.c_str());
|
||||
uint8 source = (objectEntry->flags & 0xF0) >> 4;
|
||||
uint8 source = object_entry_get_source_game(object_list_find_by_name(identifier.c_str()));
|
||||
|
||||
static const rct_object_entry * scgPathX = object_list_find_by_name("SCGPATHX");
|
||||
|
||||
if (scgPathX != nullptr && source != 8)
|
||||
if (scgPathX != nullptr && source != OBJECT_SOURCE_RCT2)
|
||||
{
|
||||
SetPrimarySceneryGroup((rct_object_entry *)scgPathX);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user