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

Function MoveToGetInPos

engine/Poseidon/AI/AIUnitImpl.cpp:193–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193void MoveToGetInPos(AIUnit* unit, Transport& veh)
194{
195 Vector3 pos = veh.GetUnitGetInPos(unit);
196 pos[1] = GLandscape->RoadSurfaceYAboveWater(pos[0], pos[2]);
197 Vector3 dir = veh.Position() - pos;
198 dir[1] = 0;
199 Matrix4 trans;
200 trans.SetUpAndDirection(VUp, dir);
201 trans.SetPosition(pos);
202 unit->GetPerson()->Move(trans);
203}
204
205static bool AvoidBeInWith(AICenter* center, Person* person)
206{

Callers 2

ProcessGetInMethod · 0.85
ProcessMethod · 0.85

Calls 7

GetUnitGetInPosMethod · 0.80
GetPersonMethod · 0.80
PositionMethod · 0.45
SetUpAndDirectionMethod · 0.45
SetPositionMethod · 0.45
MoveMethod · 0.45

Tested by

no test coverage detected