mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-17 20:10:23 +03:00
* Level: Implement findPath with PathFinder now.
This commit is contained in:
@@ -27,8 +27,8 @@ void Path::setNodes(Node** pNodes, int nodeCount)
|
||||
|
||||
for (int i = 0; i < nodeCount; i++)
|
||||
{
|
||||
// TODO: We are using the pNodes array for storage but duplicating the pNodes?
|
||||
// This might cause a memory leak?
|
||||
// This won't cause a memory leak since the pNodes before are managed
|
||||
// by
|
||||
Node* oldNode = pNodes[i];
|
||||
m_pNodes[i] = new Node;
|
||||
*m_pNodes[i] = *oldNode;
|
||||
|
||||
Reference in New Issue
Block a user