From 54cc73535ed902481ca48dfc5c0896d4e1bb895f Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Tue, 16 Jul 2024 01:35:41 +0200 Subject: [PATCH] Recast: reorder and initialize dtPathCorridor vector members Properly initialize them and pack them nicely into its struct. --- .../recast/DetourCrowd/Include/DetourPathCorridor.h | 6 +++--- .../recast/DetourCrowd/Source/DetourPathCorridor.cpp | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/thirdparty/recast/DetourCrowd/Include/DetourPathCorridor.h b/src/thirdparty/recast/DetourCrowd/Include/DetourPathCorridor.h index 3df00eb5..6a21d494 100644 --- a/src/thirdparty/recast/DetourCrowd/Include/DetourPathCorridor.h +++ b/src/thirdparty/recast/DetourCrowd/Include/DetourPathCorridor.h @@ -25,12 +25,12 @@ /// @ingroup crowd, detour class dtPathCorridor { - float m_pos[3]; - float m_target[3]; - dtPolyRef* m_path; int m_npath; int m_maxPath; + + float m_pos[3]; + float m_target[3]; public: dtPathCorridor(); diff --git a/src/thirdparty/recast/DetourCrowd/Source/DetourPathCorridor.cpp b/src/thirdparty/recast/DetourCrowd/Source/DetourPathCorridor.cpp index f6c2b9fb..27224d7e 100644 --- a/src/thirdparty/recast/DetourCrowd/Source/DetourPathCorridor.cpp +++ b/src/thirdparty/recast/DetourCrowd/Source/DetourPathCorridor.cpp @@ -201,6 +201,8 @@ dtPathCorridor::dtPathCorridor() : m_npath(0), m_maxPath(0) { + rdVset(m_pos, 0.0f,0.0f,0.0f); + rdVset(m_target, 0.0f,0.0f,0.0f); } dtPathCorridor::~dtPathCorridor()