pass in AZ::Utils::GetProjectPath().c_str() directly since converting projectpath is not needed

Signed-off-by: Gene Walters <genewalt@amazon.com>
This commit is contained in:
Gene Walters
2021-10-06 16:35:21 -07:00
parent d36041d1b7
commit 50fe8bc04d
@@ -144,13 +144,11 @@ namespace Multiplayer
}
// Start the configured server if it's available
AZStd::string projectPath(AZ::Utils::GetProjectPath().c_str());
AZStd::replace(projectPath.begin(), projectPath.end(), AZ::IO::WindowsPathSeparator, AZ::IO::PosixPathSeparator);
AzFramework::ProcessLauncher::ProcessLaunchInfo processLaunchInfo;
processLaunchInfo.m_commandlineParameters = AZStd::string::format(
R"("%s" --project-path "%s" --editorsv_isDedicated true --sv_defaultPlayerSpawnAsset "%s")",
serverPath.c_str(),
projectPath.c_str(),
AZ::Utils::GetProjectPath().c_str(),
static_cast<AZ::CVarFixedString>(sv_defaultPlayerSpawnAsset).c_str());
processLaunchInfo.m_showWindow = true;
processLaunchInfo.m_processPriority = AzFramework::ProcessPriority::PROCESSPRIORITY_NORMAL;