1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-31 02:35:46 +01:00

Support RCT Classic ride music

This commit is contained in:
Ted John
2022-08-16 20:01:40 +01:00
committed by Gymnasiast
parent 85a66c67ac
commit 7d5e2e815e
2 changed files with 16 additions and 3 deletions

View File

@@ -185,9 +185,8 @@ ObjectAsset MusicObject::GetAsset(IReadObjectContext& context, std::string_view
{
if (path.find("$RCT2:DATA/") == 0)
{
auto platformEnvironment = GetContext()->GetPlatformEnvironment();
auto dir = platformEnvironment->GetDirectoryPath(DIRBASE::RCT2, DIRID::DATA);
auto path2 = Path::Combine(dir, std::string(path.substr(11)));
auto env = GetContext()->GetPlatformEnvironment();
auto path2 = env->FindFile(DIRBASE::RCT2, DIRID::DATA, path.substr(11));
return ObjectAsset(path2);
}