fix: bots at difficulty 0 unable to do anything useful
fix: lang configs unable to parse last translated line (fixes #340) fix: last enemy isn't cleared instantly with dead entity anymore fix: bot weakness in pistol rounds analyzer: improved optimization of useless nodes linkage: make inability to call gamedll player( non-fatal linkage: fixed bot boot on WON engines pre 2000 builds (support for beta 6.5 restored) cvars: added suupport to revert all cvars to defaults via 'yb cvars defaults' cvars: added cv_preferred_personality to select bot default personality refactor: use single function to send hud messages over the bot code bot: added random original podbot welcome message to preserve origins of this bot conf: shuffle bot names and chatter items on conflig load conf: simplified a bit chatter.cfg syntax (old syntax still works build: added support for building with CMake (thanks @Velaron) refactor: rall the memory hooks moved into their one cpp file
This commit is contained in:
parent
01046f7c9a
commit
bf91ef2831
35 changed files with 1256 additions and 734 deletions
|
|
@ -17,10 +17,8 @@ private:
|
|||
|
||||
StringArray m_sentences {};
|
||||
SmallArray <Client> m_clients {};
|
||||
SmallArray <Twin <String, String>> m_tags {};
|
||||
|
||||
HashMap <int32_t, String> m_weaponAlias {};
|
||||
Detour <decltype (sendto)> m_sendToDetour { };
|
||||
|
||||
public:
|
||||
BotSupport ();
|
||||
|
|
@ -67,23 +65,11 @@ public:
|
|||
bool findNearestPlayer (void **holder, edict_t *to, float searchDistance = 4096.0, bool sameTeam = false, bool needBot = false, bool needAlive = false, bool needDrawn = false, bool needBotWithC4 = false);
|
||||
|
||||
// tracing decals for bots spraying logos
|
||||
void traceDecals (entvars_t *pev, TraceResult *trace, int logotypeIndex);
|
||||
void decalTrace (entvars_t *pev, TraceResult *trace, int logotypeIndex);
|
||||
|
||||
// update stats on clients
|
||||
void updateClients ();
|
||||
|
||||
// chat helper to strip the clantags out of the string
|
||||
void stripTags (String &line);
|
||||
|
||||
// chat helper to make player name more human-like
|
||||
void humanizePlayerName (String &playerName);
|
||||
|
||||
// chat helper to add errors to the bot chat string
|
||||
void addChatErrors (String &line);
|
||||
|
||||
// chat helper to find keywords for given string
|
||||
bool checkKeywords (StringRef line, String &reply);
|
||||
|
||||
// generates ping bitmask for SVC_PINGS message
|
||||
int getPingBitmask (edict_t *ent, int loss, int ping);
|
||||
|
||||
|
|
@ -96,9 +82,6 @@ public:
|
|||
// send modified pings to all the clients
|
||||
void emitPings (edict_t *to);
|
||||
|
||||
// installs the sendto function interception
|
||||
void installSendTo ();
|
||||
|
||||
// checks if same model omitting the models directory
|
||||
bool isModel (const edict_t *ent, StringRef model);
|
||||
|
||||
|
|
@ -113,6 +96,7 @@ public:
|
|||
// re-show welcome after changelevel ?
|
||||
void setNeedForWelcome (bool need) {
|
||||
m_needToSendWelcome = need;
|
||||
m_welcomeReceiveTime = -1.0f;
|
||||
}
|
||||
|
||||
// get array of clients
|
||||
|
|
@ -130,11 +114,6 @@ public:
|
|||
return m_clients[index];
|
||||
}
|
||||
|
||||
// disables send hook
|
||||
bool disableSendTo () {
|
||||
return m_sendToDetour.restore ();
|
||||
}
|
||||
|
||||
// gets the shooting cone deviation
|
||||
float getShootingCone (edict_t *ent, const Vector &pos) {
|
||||
return ent->v.v_angle.forward () | (pos - (ent->v.origin + ent->v.view_ofs)).normalize (); // he's facing it, he meant it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue