fix: crash introduced in pr #656

This commit is contained in:
jeefo 2025-01-18 19:53:27 +03:00
commit 44567766be
No known key found for this signature in database
GPG key ID: D696786B81B667C8

View file

@ -507,6 +507,9 @@ void Bot::setAimDirection () {
auto predictNode = m_lastPredictIndex;
auto isPredictedIndexApplicable = [&] () -> bool {
if (!graph.exists (predictNode)) {
return false;
}
TraceResult result {};
game.testLine (getEyesPos (), graph[predictNode].origin + pev->view_ofs, TraceIgnore::None, ent (), &result);