Fix crashes when no hitboxes are found

This commit is contained in:
BenCat07 2020-06-06 22:57:55 +02:00 committed by LightCat
parent a806c61af8
commit 4e93ca206c

View File

@ -720,7 +720,10 @@ bool IsTargetStateGood(CachedEntity *entity)
}
// Preform hitbox prediction
int hitbox = BestHitbox(entity);
int hitbox = BestHitbox(entity);
// Bad hitbox
if (hitbox == -1)
return false;
AimbotCalculatedData_s &cd = calculated_data_array[entity->m_IDX];
cd.hitbox = hitbox;