mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
fea4fb6e69
Even when target is not reachable actor will try to run there either because target navmesh polygon is selected within extended area or because partial path is built to the closest possible polygon.
47 lines
1.5 KiB
C++
47 lines
1.5 KiB
C++
#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_STATUS_H
|
|
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_STATUS_H
|
|
|
|
namespace DetourNavigator
|
|
{
|
|
enum class Status
|
|
{
|
|
Success,
|
|
PartialPath,
|
|
NavMeshNotFound,
|
|
StartPolygonNotFound,
|
|
EndPolygonNotFound,
|
|
MoveAlongSurfaceFailed,
|
|
FindPathOverPolygonsFailed,
|
|
GetPolyHeightFailed,
|
|
InitNavMeshQueryFailed,
|
|
};
|
|
|
|
constexpr const char* getMessage(Status value)
|
|
{
|
|
switch (value)
|
|
{
|
|
case Status::Success:
|
|
return "success";
|
|
case Status::PartialPath:
|
|
return "partial path is found";
|
|
case Status::NavMeshNotFound:
|
|
return "navmesh is not found";
|
|
case Status::StartPolygonNotFound:
|
|
return "polygon for start position is not found on navmesh";
|
|
case Status::EndPolygonNotFound:
|
|
return "polygon for end position is not found on navmesh";
|
|
case Status::MoveAlongSurfaceFailed:
|
|
return "move along surface on navmesh is failed";
|
|
case Status::FindPathOverPolygonsFailed:
|
|
return "path over navmesh polygons is not found";
|
|
case Status::GetPolyHeightFailed:
|
|
return "failed to get polygon height";
|
|
case Status::InitNavMeshQueryFailed:
|
|
return "failed to init navmesh query";
|
|
}
|
|
return "unknown error";
|
|
}
|
|
}
|
|
|
|
#endif
|