nav: fall controls are not good. (#656)

nav: fall controls are not good.
nav: increased behavior rate in finding the best goal.
nav: avoiding the door after hitting it.
combat: if the enemy is using a sniper rifle, move.
combat: enemy group functionality has been improved.
combat: if we are doing a camping task, do not switch to a knife at close range.
aim: slight changes to enemy prediction.

---------

Co-authored-by: jeefo <dmitry@jeefo.net>
This commit is contained in:
commandcobra7 2025-01-09 21:53:16 +03:00 committed by GitHub
commit e717710bd1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 245 additions and 211 deletions

View file

@ -128,7 +128,7 @@ public:
bool kickRandom (bool decQuota = true, Team fromTeam = Team::Unassigned);
bool balancedKickRandom (bool decQuota);
bool hasCustomCSDMSpawnEntities ();
bool isLineBlockedBySmoke (const Vector &from, const Vector &to, float grenadeBloat = 1.0f);
bool isLineBlockedBySmoke (const Vector &from, const Vector &to);
bool isFrameSkipDisabled ();
public:

View file

@ -237,6 +237,7 @@ private:
float m_prevSpeed {}; // speed some frames before
float m_prevVelocity {}; // velocity some frames before
float m_timeDoorOpen {}; // time to next door open check
float m_timeHitDoor {}; // specific time after hitting the door
float m_lastChatTime {}; // time bot last chatted
float m_timeLogoSpray {}; // time bot last spray logo
float m_knifeAttackTime {}; // time to rush with knife (at the beginning of the round)
@ -284,7 +285,6 @@ private:
float m_playServerTime {}; // time bot spent in the game
float m_changeViewTime {}; // timestamp to change look at while at freezetime
float m_breakableTime {}; // breakable acquired time
float m_stuckTimestamp {}; // last time was stuck
float m_timeDebugUpdateTime {}; // time to update last debug timestamp
float m_lastVictimTime {}; // time when bot killed an enemy
float m_killsInterval {}; // interval between kills
@ -437,7 +437,7 @@ private:
bool isEnemyNoTarget (edict_t *enemy);
bool isEnemyInDarkArea (edict_t *enemy);
bool isFriendInLineOfFire (float distance);
bool isGroupOfEnemies (const Vector &location, int numEnemies = 1, float radius = 256.0f);
bool isGroupOfEnemies (const Vector &location);
bool isPenetrableObstacle (const Vector &dest);
bool isPenetrableObstacle1 (const Vector &dest, int penetratePower);
bool isPenetrableObstacle2 (const Vector &dest, int penetratePower);
@ -831,11 +831,6 @@ private:
return m_weaponType == WeaponType::Sniper;
}
// returns true if bot is using a sniper rifle (awp)
bool usesSniperAWP () const {
return m_currentWeapon == Weapon::AWP;
}
// returns true if bot is using a rifle
bool usesRifle () const {
return usesZoomableRifle () || m_weaponType == WeaponType::Rifle;