Recast: reorder and initialize dtPathCorridor vector members

Properly initialize them and pack them nicely into its struct.
This commit is contained in:
Kawe Mazidjatari 2024-07-16 01:35:41 +02:00
parent cf755b286b
commit 54cc73535e
2 changed files with 5 additions and 3 deletions

View File

@ -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();

View File

@ -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()