HomeWildfire Games

Move the Vertex Pathfinder to its own helper class

Description

Move the Vertex Pathfinder to its own helper class

The vertex pathfinder was implemented directly in CCmpPathfinder, instead of being a separate helper like the hierarchical pathfinder or the long pathfinder.

This moves it to its own helper VertexPathfinder, which gets us ready for D14 and pathfinder threading. Some struct definitions need to be moved around.

Differential Revision: https://code.wildfiregames.com/D1855

Event Timeline

elexis added a subscriber: elexis.Jun 28 2019, 4:47 PM

Move the Vertex Pathfinder to its own helper class

Seems good.

/ps/trunk/source/simulation2/components/CCmpPathfinder.cpp
57

Pointers can null-deref and needs protection or extra-caution for that. Given that the previous code didn't necessitate pointers, I assume (perhaps wrongfully?) that a pointer is not necessary here

wraitii added inline comments.Jun 28 2019, 4:52 PM
/ps/trunk/source/simulation2/components/CCmpPathfinder.cpp
57

It is necessary because references must be initialised in the constructor (this is Init).
Making this not a const-ref would blow up the size of the pathfinder component, which I don't think is a great idea - can be debated.