bot: add basic support to play as zombie bot
aim: check that we're actually hit the target in body checks
This commit is contained in:
parent
70ff2d0ec2
commit
3009b4f50a
8 changed files with 101 additions and 26 deletions
|
|
@ -307,6 +307,11 @@ public:
|
|||
return m_paths.length <int32_t> ();
|
||||
}
|
||||
|
||||
// get the random node on map
|
||||
int32_t random () const {
|
||||
return rg.get (0, length () - 1);
|
||||
}
|
||||
|
||||
// check if has editor
|
||||
bool hasEditor () const {
|
||||
return !!m_editor;
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ public:
|
|||
void erase (Bot *bot);
|
||||
void handleDeath (edict_t *killer, edict_t *victim);
|
||||
void setLastWinner (int winner);
|
||||
void checkBotModel (edict_t *ent, char *infobuffer);
|
||||
|
||||
bool isTeamStacked (int team);
|
||||
bool kickRandom (bool decQuota = true, Team fromTeam = Team::Unassigned);
|
||||
|
|
|
|||
|
|
@ -771,6 +771,7 @@ private:
|
|||
bool m_grenadeRequested {}; // bot requested change to grenade
|
||||
bool m_needToSendWelcomeChat {}; // bot needs to greet people on server?
|
||||
bool m_switchedToKnifeDuringJump {}; // bot needs to revert weapon after jump?
|
||||
bool m_isCreature {}; // bot is not a player, but something else ? zombie ?
|
||||
|
||||
Pickup m_pickupType {}; // type of entity which needs to be used/picked up
|
||||
PathWalk m_pathWalk {}; // pointer to current node from path
|
||||
|
|
@ -779,6 +780,7 @@ private:
|
|||
CollisionState m_collisionState {}; // collision State
|
||||
FindPath m_pathType {}; // which pathfinder to use
|
||||
uint8_t m_enemyParts {}; // visibility flags
|
||||
uint16_t m_modelMask {}; // model mask bits
|
||||
TraceResult m_lastTrace[TraceChannel::Num] {}; // last trace result
|
||||
UniquePtr <class AStarAlgo> m_planner;
|
||||
|
||||
|
|
@ -894,6 +896,7 @@ private:
|
|||
bool canRunHeavyWeight ();
|
||||
bool isEnemyInSight (Vector &endPos);
|
||||
bool isEnemyNoticeable (float range);
|
||||
bool isCreature ();
|
||||
|
||||
void doPlayerAvoidance (const Vector &normal);
|
||||
void selectCampButtons (int index);
|
||||
|
|
@ -953,6 +956,7 @@ private:
|
|||
void refreshEnemyPredict ();
|
||||
void syncUpdatePredictedIndex ();
|
||||
void updatePredictedIndex ();
|
||||
void refreshModelName (char *infobuffer);
|
||||
|
||||
void completeTask ();
|
||||
void executeTasks ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue