Fix for LoadLevel not being called. (#584)

This commit is contained in:
bosnichd
2021-05-05 13:35:50 -06:00
committed by GitHub
parent 7ba3a19b40
commit 5783bf635b
4 changed files with 7 additions and 15 deletions
+1 -8
View File
@@ -539,19 +539,12 @@ void CGameEngine::SetLevelPath(const QString& path)
}
}
void CGameEngine::SetMissionName(const QString& mission)
{
m_missionName = mission;
}
bool CGameEngine::LoadLevel(
const QString& mission,
[[maybe_unused]] bool bDeleteAIGraph,
bool bReleaseResources)
{
LOADING_TIME_PROFILE_SECTION(GetIEditor()->GetSystem());
m_bLevelLoaded = false;
m_missionName = mission;
CLogFile::FormatLine("Loading map '%s' into engine...", m_levelPath.toUtf8().data());
// Switch the current directory back to the Primary CD folder first.
// The engine might have trouble to find some files when the current
@@ -600,7 +593,7 @@ bool CGameEngine::LoadLevel(
bool CGameEngine::ReloadLevel()
{
if (!LoadLevel(GetMissionName(), false, false))
if (!LoadLevel(false, false))
{
return false;
}