MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / correct_position

Method correct_position

ogsr_engine/COMMON_AI/PATH/patrol_point.cpp:51–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49#endif
50
51IC void CPatrolPoint::correct_position(const CLevelGraph* level_graph, const CGameLevelCrossTable* cross, const CGameGraph* game_graph)
52{
53 if (!level_graph || !level_graph->valid_vertex_position(position()) || !level_graph->valid_vertex_id(m_level_vertex_id))
54 return;
55
56 if (!level_graph->inside(level_vertex_id(level_graph, cross, game_graph), position()))
57 m_position = level_graph->vertex_position(level_vertex_id(level_graph, cross, game_graph));
58
59 m_game_vertex_id = cross->vertex(level_vertex_id(level_graph, cross, game_graph)).game_vertex_id();
60}
61
62CPatrolPoint::CPatrolPoint(const CPatrolPath* path, const Fvector& position, u32 level_vertex_id, u32 flags, shared_str name)
63{

Callers

nothing calls this directly

Calls 6

valid_vertex_positionMethod · 0.80
vertex_positionMethod · 0.80
valid_vertex_idMethod · 0.45
insideMethod · 0.45
game_vertex_idMethod · 0.45
vertexMethod · 0.45

Tested by

no test coverage detected