fix: crash when enabling hitbox aiming between rounds

This commit is contained in:
jeefo 2025-03-20 08:15:26 +03:00
commit 40dc667e03
No known key found for this signature in database
GPG key ID: D696786B81B667C8
3 changed files with 9 additions and 4 deletions

View file

@ -1562,7 +1562,12 @@ void Bot::newRound () {
m_hostages.clear ();
if (cv_use_hitbox_enemy_targeting) {
m_hitboxEnumerator->reset ();
if (m_hitboxEnumerator) {
m_hitboxEnumerator->reset ();
}
else {
m_hitboxEnumerator = cr::makeUnique <PlayerHitboxEnumerator> ();
}
}
m_approachingLadderTimer.invalidate ();