fix: bots not throwing grenades since last commit

combat: various fixes to combat movements
combat: tweaked grenade throwing code
refactor: convert some arrays initializations  to initializer lists
build: switch docker image to clang 18.1
This commit is contained in:
jeefo 2024-03-09 01:06:11 +03:00
commit 2caa65f6ad
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
14 changed files with 253 additions and 221 deletions

View file

@ -297,7 +297,6 @@ private:
bool m_isLeader {}; // bot is leader of his team
bool m_checkTerrain {}; // check for terrain
bool m_moveToC4 {}; // ct is moving to bomb
bool m_grenadeRequested {}; // bot requested change to grenade
bool m_needToSendWelcomeChat {}; // bot needs to greet people on server?
bool m_isCreature {}; // bot is not a player, but something else ? zombie ?
bool m_defuseNotified {}; // bot is notified about bomb defusion
@ -367,7 +366,7 @@ private:
int numEnemiesNear (const Vector &origin, const float radius);
int numFriendsNear (const Vector &origin, const float radius);
float getBombTimeleft ();
float getBombTimeleft () const;
float getEstimatedNodeReachTime ();
float isInFOV (const Vector &dest);
float getShiftSpeed ();
@ -386,8 +385,8 @@ private:
bool checkWallOnRight ();
bool updateNavigation ();
bool isEnemyThreat ();
bool isWeaponRestricted (int weaponIndex);
bool isWeaponRestrictedAMX (int weaponIndex);
bool isWeaponRestricted (int wid);
bool isWeaponRestrictedAMX (int wid);
bool isInViewCone (const Vector &origin);
bool checkBodyParts (edict_t *target);
bool seesEnemy (edict_t *player);
@ -560,6 +559,11 @@ private:
}
}
// get run player move angles
const Vector &getRpmAngles () {
return getCurrentTaskId () == Task::Attack ? pev->v_angle : m_moveAngles;
}
public:
entvars_t *pev {};