aim: added optional hitbox-based aiming for bots (ref #579)

This commit is contained in:
jeefo 2024-06-02 23:03:12 +03:00
commit 8dece62df6
No known key found for this signature in database
GPG key ID: D696786B81B667C8
6 changed files with 264 additions and 3 deletions

View file

@ -1229,6 +1229,9 @@ Bot::Bot (edict_t *bot, int difficulty, int personality, int team, int skin) {
// init async planner
m_planner = cr::makeUnique <AStarAlgo> (graph.length ());
// init player models parts enumerator
m_hitboxEnumerator = cr::makeUnique <PlayerHitboxEnumerator> ();
// bot is not kicked by rotation
m_kickedByRotation = false;
@ -1241,7 +1244,6 @@ Bot::Bot (edict_t *bot, int difficulty, int personality, int team, int skin) {
newRound ();
}
void Bot::clearAmmoInfo () {
plat.bzero (&m_ammoInClip, sizeof (m_ammoInClip));
plat.bzero (&m_ammo, sizeof (m_ammo));
@ -1545,6 +1547,7 @@ void Bot::newRound () {
m_followWaitTime = 0.0f;
m_hostages.clear ();
m_hitboxEnumerator->reset ();
m_approachingLadderTimer.invalidate ();
m_forgetLastVictimTimer.invalidate ();