Pathfinding optimizations
Fix build error
Move registering of enums from global.lua to C++