04-23-2015, 08:02 PM
(This post was last modified: 04-24-2015, 04:42 AM by LogicParrot.)
I finally got the PathFinder to compile as part of MCServer!
The issue was that MCServer's Vector3 had no hash function. I had to modify Vector3.h, I added this.
This is obviously a primitive hash function, I'm going to change it into a Z-order curve, but it made the code compile.
Next steps:
The issue was that MCServer's Vector3 had no hash function. I had to modify Vector3.h, I added this.
namespace std
{
template <>
struct hash<Vector3d>
{
std::size_t operator()(const Vector3d & v2) const
{
return(v2.x + v2.y + v2.z); // TODO this is not the best hash out there
}
};
}
This is obviously a primitive hash function, I'm going to change it into a Z-order curve, but it made the code compile.
Next steps:
- Z-order curve for Vector3
- Make the class query cWorld / cChunk
- Make a zombie pathfind

