From f91449190a6a5c294ddfa397ae2af5a17df7bad2 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 10 Feb 2018 21:43:26 +0000 Subject: [PATCH] Allow game to run without RCT2 install path --- src/openrct2/Context.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index 09ec0ce153..c0329090a2 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -301,12 +301,15 @@ namespace OpenRCT2 // return false; // } //This comment was relocated so it would stay where it was in relation to the following lines of code. - auto rct2InstallPath = GetOrPromptRCT2Path(); - if (rct2InstallPath.empty()) + if (!gOpenRCT2Headless) { - return false; + auto rct2InstallPath = GetOrPromptRCT2Path(); + if (rct2InstallPath.empty()) + { + return false; + } + _env->SetBasePath(DIRBASE::RCT2, rct2InstallPath); } - _env->SetBasePath(DIRBASE::RCT2, rct2InstallPath); _objectRepository = CreateObjectRepository(_env); _objectManager = CreateObjectManager(_objectRepository);