MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / GetPlanPosition

Method GetPlanPosition

engine/Poseidon/AI/Path/PathPlanner.cpp:1536–1551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1534}
1535
1536bool AIPathPlanner::GetPlanPosition(int index, Vector3& pos) const
1537{
1538 int n = _planPoints.Size();
1539 AI_ERROR(n == _plan.Size()); // _planPoints valid
1540
1541 if (n <= 0)
1542 {
1543 pos = _destination;
1544 return true;
1545 }
1546
1547 saturate(index, 0, n - 1);
1548
1549 pos = _planPoints[index];
1550 return index == n - 1;
1551}
1552
1553FieldPassing::Mode AIPathPlanner::GetPlanMode(int index) const
1554{

Callers 4

CopyPathMethod · 0.80
OperPathMethod · 0.80
CreateOperativePathMethod · 0.80
DrawExtMethod · 0.80

Calls 2

saturateFunction · 0.85
SizeMethod · 0.45

Tested by

no test coverage detected