fix: logos config not initialized (resolves #691)
bot: make sure rescue zone icon blinking to consider bot reached rescue zone when escorting hostages (ref #688) bot: remove hardcoded radio communication randoms, so they're now depends on bots personality refactor: some refactoring of code
This commit is contained in:
parent
d6d76e136d
commit
6dfb09f110
26 changed files with 180 additions and 141 deletions
55
inc/yapb.h
55
inc/yapb.h
|
|
@ -225,6 +225,7 @@ private:
|
|||
int m_tryOpenDoor {}; // attempt's to open the door
|
||||
int m_liftState {}; // state of lift handling
|
||||
int m_radioSelect {}; // radio entry
|
||||
int m_radioPercent {}; // radio usage percent (in response)
|
||||
int m_killsCount {}; // the kills count of a bot
|
||||
|
||||
int m_lastPredictIndex {}; // last predicted path index
|
||||
|
|
@ -370,7 +371,7 @@ private:
|
|||
CountdownTimer m_repathTimer {}; // bots is going to repath his route
|
||||
|
||||
private:
|
||||
int pickBestWeapon (Array <int> &vec, int moneySave);
|
||||
int pickBestWeapon (Array <int> &vec, int moneySave) const;
|
||||
int getRandomCampDir ();
|
||||
int findAimingNode (const Vector &to, int &pathLength);
|
||||
int findNearestNode ();
|
||||
|
|
@ -382,18 +383,18 @@ private:
|
|||
int findGoalPost (int tactic, IntArray *defensive, IntArray *offensive);
|
||||
int bestPrimaryCarried ();
|
||||
int bestSecondaryCarried ();
|
||||
int bestGrenadeCarried ();
|
||||
int getBestOwnedWeapon ();
|
||||
int getBestOwnedPistol ();
|
||||
int bestGrenadeCarried () const;
|
||||
int getBestOwnedWeapon () const;
|
||||
int getBestOwnedPistol () const;
|
||||
int changeNodeIndex (int index);
|
||||
int numEnemiesNear (const Vector &origin, const float radius);
|
||||
int numFriendsNear (const Vector &origin, const float radius);
|
||||
int numEnemiesNear (const Vector &origin, const float radius) const;
|
||||
int numFriendsNear (const Vector &origin, const float radius) const;
|
||||
|
||||
float getBombTimeleft () const;
|
||||
float getEstimatedNodeReachTime ();
|
||||
float isInFOV (const Vector &dest);
|
||||
float isInFOV (const Vector &dest) const;
|
||||
float getShiftSpeed ();
|
||||
float calculateScaleFactor (edict_t *ent);
|
||||
float calculateScaleFactor (edict_t *ent) const;
|
||||
|
||||
bool canReplaceWeapon ();
|
||||
bool canDuckUnder (const Vector &normal);
|
||||
|
|
@ -418,14 +419,14 @@ private:
|
|||
bool seesEnemy (edict_t *player);
|
||||
bool hasActiveGoal ();
|
||||
bool advanceMovement ();
|
||||
bool isBombDefusing (const Vector &bombOrigin);
|
||||
bool isBombDefusing (const Vector &bombOrigin) const;
|
||||
bool isOccupiedNode (int index, bool needZeroVelocity = false);
|
||||
bool seesItem (const Vector &dest, StringRef classname);
|
||||
bool lastEnemyShootable ();
|
||||
bool rateGroundWeapon (edict_t *ent);
|
||||
bool reactOnEnemy ();
|
||||
bool selectBestNextNode ();
|
||||
bool hasAnyWeapons ();
|
||||
bool hasAnyWeapons () const;
|
||||
bool hasAnyAmmoInClip ();
|
||||
bool isKnifeMode ();
|
||||
bool isGrenadeWar ();
|
||||
|
|
@ -439,13 +440,13 @@ private:
|
|||
bool isEnemyHidden (edict_t *enemy);
|
||||
bool isEnemyInvincible (edict_t *enemy);
|
||||
bool isEnemyNoTarget (edict_t *enemy);
|
||||
bool isEnemyInDarkArea (edict_t *enemy);
|
||||
bool isFriendInLineOfFire (float distance);
|
||||
bool isEnemyInDarkArea (edict_t *enemy) const;
|
||||
bool isFriendInLineOfFire (float distance) const;
|
||||
bool isGroupOfEnemies (const Vector &location);
|
||||
bool isPenetrableObstacle (const Vector &dest);
|
||||
bool isPenetrableObstacle1 (const Vector &dest, int penetratePower);
|
||||
bool isPenetrableObstacle2 (const Vector &dest, int penetratePower);
|
||||
bool isPenetrableObstacle3 (const Vector &dest, int penetratePower);
|
||||
bool isPenetrableObstacle1 (const Vector &dest, int penetratePower) const;
|
||||
bool isPenetrableObstacle2 (const Vector &dest, int penetratePower) const;
|
||||
bool isPenetrableObstacle3 (const Vector &dest, int penetratePower) const;
|
||||
bool isEnemyBehindShield (edict_t *enemy);
|
||||
bool checkChatKeywords (String &reply);
|
||||
bool isReplyingToChat ();
|
||||
|
|
@ -455,13 +456,13 @@ private:
|
|||
bool canRunHeavyWeight ();
|
||||
bool isEnemyInSight (Vector &endPos);
|
||||
bool isEnemyNoticeable (float range);
|
||||
bool isCreature ();
|
||||
bool isPreviousLadder ();
|
||||
bool isCreature () const;
|
||||
bool isPreviousLadder () const;
|
||||
bool isIgnoredItem (edict_t *ent);
|
||||
|
||||
void doPlayerAvoidance (const Vector &normal);
|
||||
void selectCampButtons (int index);
|
||||
void instantChatter (int type);
|
||||
void instantChatter (int type) const;
|
||||
void update ();
|
||||
void runMovement ();
|
||||
void checkSpawnConditions ();
|
||||
|
|
@ -488,7 +489,7 @@ private:
|
|||
void checkFall ();
|
||||
void checkDarkness ();
|
||||
void checkParachute ();
|
||||
void updatePracticeValue (int damage);
|
||||
void updatePracticeValue (int damage) const;
|
||||
void updatePracticeDamage (edict_t *attacker, int damage);
|
||||
void findShortestPath (int srcIndex, int destIndex);
|
||||
void findPath (int srcIndex, int destIndex, FindPath pathType = FindPath::Fast);
|
||||
|
|
@ -563,9 +564,9 @@ private:
|
|||
Vector isBombAudible ();
|
||||
Vector getBodyOffsetError (float distance);
|
||||
Vector getCampDirection (const Vector &dest);
|
||||
Vector getCustomHeight (float distance);
|
||||
Vector getCustomHeight (float distance) const;
|
||||
|
||||
uint8_t computeMsec ();
|
||||
uint8_t computeMsec () const;
|
||||
|
||||
private:
|
||||
bool isOnLadder () const {
|
||||
|
|
@ -735,7 +736,7 @@ public:
|
|||
void pushMsgQueue (int message);
|
||||
void prepareChatMessage (StringRef message);
|
||||
void checkForChat ();
|
||||
void showChatterIcon (bool show, bool disconnect = false);
|
||||
void showChatterIcon (bool show, bool disconnect = false) const;
|
||||
void clearSearchNodes ();
|
||||
void checkBreakable (edict_t *touch);
|
||||
void checkBreakablesAround ();
|
||||
|
|
@ -757,16 +758,16 @@ public:
|
|||
void sendBotToOrigin (const Vector &origin);
|
||||
void markStale ();
|
||||
bool hasHostage ();
|
||||
bool hasPrimaryWeapon ();
|
||||
bool hasSecondaryWeapon ();
|
||||
bool hasPrimaryWeapon () const;
|
||||
bool hasSecondaryWeapon () const;
|
||||
bool hasShield ();
|
||||
bool isShieldDrawn ();
|
||||
bool findNextBestNode ();
|
||||
bool findNextBestNodeEx (const IntArray &data, bool handleFails);
|
||||
bool seesEntity (const Vector &dest, bool fromBody = false);
|
||||
|
||||
int getAmmo ();
|
||||
int getAmmo (int id);
|
||||
int getAmmo () const;
|
||||
int getAmmo (int id) const;
|
||||
int getNearestToPlantedBomb ();
|
||||
|
||||
float getConnectionTime ();
|
||||
|
|
@ -793,7 +794,7 @@ public:
|
|||
return getTask ()->id;
|
||||
}
|
||||
|
||||
edict_t *ent () {
|
||||
edict_t *ent () const {
|
||||
return pev->pContainingEntity;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue