graph: do not mark too far facing nodes

.. so respect the max draw distance variable
This commit is contained in:
jeefo 2024-08-06 09:14:23 +03:00
commit fe85aecbda
No known key found for this signature in database
GPG key ID: D696786B81B667C8

View file

@ -1022,7 +1022,7 @@ int BotGraph::getFacingIndex () {
auto angles = (to.angles () - m_editor->v.v_angle).clampAngles ();
// skip the nodes that are too far away from us, and we're not looking at them directly
if (to.lengthSq () > cr::sqrf (500.0f) || cr::abs (angles.y) > result.second) {
if (to.lengthSq () > cr::sqrf (cv_graph_draw_distance.as <float> ()) || cr::abs (angles.y) > result.second) {
continue;
}