0ad/source/simulation/PathfindEngine.h
Matei 1036799546 # Units will now back away from enemies when below minimum range.
Also a small water specular strength tweak.

This was SVN commit r4481.
2006-10-04 04:47:58 +00:00

48 lines
1.1 KiB
C++

// PathfindEngine.h
//
// Mark Thompson mot20@cam.ac.uk / mark@wildfiregames.com
//
// The pathfinding engine singleton.
//
// Usage: g_Pathfinder.requestPath( HEntity me, float x, float y );
//
// Mark Thompson mot20@cam.ac.uk / mark@wildfiregames.com
#ifndef PATHFIND_ENGINE_INCLUDED
#define PATHFIND_ENGINE_INCLUDED
#include "ps/Singleton.h"
#include "EntityHandles.h"
#include "ps/Vector2D.h"
#include "AStarEngine.h"
#define g_Pathfinder CPathfindEngine::GetSingleton()
class CEntityOrder;
enum EPathType
{
PF_STANDARD,
PF_ATTACK_MELEE,
};
class CPathfindEngine : public Singleton<CPathfindEngine>
{
public:
CPathfindEngine();
void requestPath( HEntity entity, const CVector2D& destination,
CEntityOrder::EOrderSource orderSource );
void requestLowLevelPath( HEntity entity, const CVector2D& destination, bool contact,
float radius, CEntityOrder::EOrderSource orderSource );
void requestContactPath( HEntity entity, CEntityOrder* current, float range );
bool requestAvoidPath( HEntity entity, CEntityOrder* current, float avoidRange );
private:
CAStarEngineLowLevel mLowPathfinder;
};
#endif