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

Function GetGetInPointFar

engine/Poseidon/AI/AISubgroupFSM.cpp:1634–1655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1632}
1633
1634static Vector3 GetGetInPointFar(AIUnit* unit, Transport* veh)
1635{
1636 Vector3 res;
1637
1638 AI_ERROR(veh == unit->VehicleAssigned());
1639
1640 if (veh->IsStopped())
1641 {
1642 res = veh->GetUnitGetInPos(unit);
1643 }
1644 else
1645 {
1646 res = veh->GetStopPosition();
1647 res += Vector3(30, 0, 0);
1648 }
1649
1650 unit->FindNearestEmpty(res);
1651
1652 res[1] = GLandscape->RoadSurfaceYAboveWater(res[0], res[2]);
1653
1654 return res;
1655}
1656
1657enum
1658{

Callers 4

GetInMoveFunction · 0.85
CheckGetInMoveFunction · 0.85
GetInWalkFunction · 0.85
CheckGetInWalkFunction · 0.85

Calls 7

VehicleAssignedMethod · 0.80
GetUnitGetInPosMethod · 0.80
Vector3Class · 0.50
IsStoppedMethod · 0.45
GetStopPositionMethod · 0.45
FindNearestEmptyMethod · 0.45

Tested by

no test coverage detected