From 0c5aaf586f7e37d58d2ef5f2ff6d17b333536d7b Mon Sep 17 00:00:00 2001 From: Causeless Date: Fri, 29 Dec 2023 18:20:22 +0000 Subject: [PATCH] Fixed issue where movepath is updated too early, causing crashes --- Entities/Actor.cpp | 5 +---- Managers/SceneMan.cpp | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Entities/Actor.cpp b/Entities/Actor.cpp index e4ee5fadb..2766e0da1 100644 --- a/Entities/Actor.cpp +++ b/Entities/Actor.cpp @@ -287,10 +287,7 @@ int Actor::Create(const Actor &reference) m_pMOMoveTarget = reference.m_pMOMoveTarget; m_PrevPathTarget = reference.m_PrevPathTarget; m_MoveVector = reference.m_MoveVector; - if (!m_Waypoints.empty()) { - UpdateMovePath(); - } -// m_MovePath.clear(); will recalc on its own + m_MovePath.clear(); m_UpdateMovePath = reference.m_UpdateMovePath; m_MoveProximityLimit = reference.m_MoveProximityLimit; m_AIBaseDigStrength = reference.m_AIBaseDigStrength; diff --git a/Managers/SceneMan.cpp b/Managers/SceneMan.cpp index ecb47b957..48555f4d0 100644 --- a/Managers/SceneMan.cpp +++ b/Managers/SceneMan.cpp @@ -139,8 +139,6 @@ int SceneMan::LoadScene(Scene *pNewScene, bool placeObjects, bool placeUnits) { g_PostProcessMan.ClearScenePostEffects(); if (m_pCurrentScene) { - // Ensure all async pathing requests are complete - m_pCurrentScene->BlockUntilAllPathingRequestsComplete(); delete m_pCurrentScene; m_pCurrentScene = nullptr; }