diff --git a/CMakeLists.txt b/CMakeLists.txt index 2153aa6b..46138634 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -346,10 +346,10 @@ function(add_lego_libraries NAME) LEGO1/lego/legoomni/src/control/legometerpresenter.cpp LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp LEGO1/lego/legoomni/src/common/mxcontrolpresenter.cpp - LEGO1/lego/legoomni/src/actors/act3ammo.cpp LEGO1/lego/legoomni/src/paths/legopathpresenter.cpp LEGO1/lego/legoomni/src/common/legophoneme.cpp LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp + LEGO1/lego/legoomni/src/actors/act3ammo.cpp LEGO1/lego/legoomni/src/entity/legojetskiraceactor.cpp LEGO1/lego/legoomni/src/audio/lego3dwavepresenter.cpp LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp diff --git a/LEGO1/lego/legoomni/include/legopathcontroller.h b/LEGO1/lego/legoomni/include/legopathcontroller.h index 5e3bd8ae..1a13f961 100644 --- a/LEGO1/lego/legoomni/include/legopathcontroller.h +++ b/LEGO1/lego/legoomni/include/legopathcontroller.h @@ -5,11 +5,10 @@ #include "geom/legounkown100db7f4.h" #include "legopathactor.h" #include "legopathboundary.h" -#include "mxcore.h" +#include "legopathstruct.h" #include "mxstl/stlcompat.h" class LegoAnimPresenter; -class LegoPathStruct; class LegoWorld; class MxAtomId; class Vector3; diff --git a/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp b/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp index f168b050..f81f4011 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp @@ -1,7 +1,6 @@ #include "legopathcontroller.h" #include "legopathedgecontainer.h" -#include "legopathstruct.h" #include "misc/legostorage.h" #include "mxmisc.h" #include "mxticklemanager.h" @@ -214,12 +213,21 @@ MxResult LegoPathController::PlaceActor( } LegoPathBoundary* pBoundary = GetPathBoundary(p_name); + + assert(pBoundary); + assert(p_src < pBoundary->GetNumEdges() && p_dest < pBoundary->GetNumEdges()); + LegoEdge* pSrcE = pBoundary->GetEdges()[p_src]; LegoEdge* pDestE = pBoundary->GetEdges()[p_dest]; - float time = Timer()->GetTime(); - if (p_actor->VTable0x88(pBoundary, time, *pSrcE, p_srcScale, (LegoUnknown100db7f4&) *pDestE, p_destScale) != - SUCCESS) { + assert(pSrcE && pDestE); + + float time = Timer()->GetTime(); + MxResult result = + p_actor->VTable0x88(pBoundary, time, *pSrcE, p_srcScale, (LegoUnknown100db7f4&) *pDestE, p_destScale); + + if (result != SUCCESS) { + assert(0); return FAILURE; }