aim: verify camp angles from nav data before using them
aim: tweaked a bit grenade handling, so bots should use them more aim: reduce time between selecting grenade and throwing it away aim: removed hacks in look angles code, due to removing yb_whoose_your_daddy cvar aim: use direct enemy origin from visibility check, and not re-calculate it aim: update enemy prediction, so it now depends on frame interval for a bot aim: additional height offset are tweaked, and now used only for difficulty 4 nav: tweaked a bit player avoidance code, and it's not preventing bot from checking terrain nav: do not check banned nodes, when bucket sizes re too low nav: cover nodes are now selected depending on total bots on server nav: let bot enter pause task after long jump nav: extend velocity by a little for a jump, like it was in first versions of bot nav: stuck checking is now taken in account lower minimal speed if bot is ducking fix: navigation reachability timers, so bots will have correct current node index while camping fix: bots are unable to finish pickup or destroy breakable task, if target is not reachable fix: cover nodes are now calculated as they should fix: manual calling bots add_[t/ct] now ignores yb_join_team cvar bot: tweaked a little difficulty levels, so level 4 is now nightmare level, and 3 is very heard bot: minor refactoring and moving functions to correct source file bot: add yb_economics_disrespect_percent, so bots can ignore economics and buy more different guns bot: add yb_check_darkness that allows to disable darkness checks for bot, thus disallowing usage of flashlight bot: camp buttons are now lightly depends on bot health chat: welcome chat message from bots is now sent during first freeze time period crlib: switch over to stdint.h and remove crlib-own types crlib: fixed alignment in sse code
This commit is contained in:
parent
722e4eda93
commit
29c00565dc
31 changed files with 1395 additions and 1305 deletions
|
|
@ -65,27 +65,27 @@ CR_DECLARE_SCOPED_ENUM (StatusIconCache,
|
|||
class MessageDispatcher final : public Singleton <MessageDispatcher> {
|
||||
private:
|
||||
using MsgFunc = void (MessageDispatcher::*) ();
|
||||
using MsgHash = Hash <int32>;
|
||||
using MsgHash = Hash <int32_t>;
|
||||
|
||||
private:
|
||||
struct Args {
|
||||
union {
|
||||
float float_;
|
||||
int32 long_;
|
||||
int32_t long_;
|
||||
const char *chars_;
|
||||
};
|
||||
|
||||
public:
|
||||
Args (float value) : float_ (value) { }
|
||||
Args (int32 value) : long_ (value) { }
|
||||
Args (int32_t value) : long_ (value) { }
|
||||
Args (const char *value) : chars_ (value) { }
|
||||
};
|
||||
|
||||
private:
|
||||
HashMap <String, int32> m_textMsgCache {}; // cache strings for faster access for textmsg
|
||||
HashMap <String, int32> m_showMenuCache {}; // cache for the showmenu message
|
||||
HashMap <String, int32> m_statusIconCache {}; // cache for status icon message
|
||||
HashMap <String, int32> m_teamInfoCache {}; // cache for teaminfo message
|
||||
HashMap <String, int32_t> m_textMsgCache {}; // cache strings for faster access for textmsg
|
||||
HashMap <String, int32_t> m_showMenuCache {}; // cache for the showmenu message
|
||||
HashMap <String, int32_t> m_statusIconCache {}; // cache for status icon message
|
||||
HashMap <String, int32_t> m_teamInfoCache {}; // cache for teaminfo message
|
||||
|
||||
private:
|
||||
Bot *m_bot {}; // owner of a message
|
||||
|
|
@ -94,9 +94,9 @@ private:
|
|||
SmallArray <Args> m_args {}; // args collected from write* functions
|
||||
|
||||
HashMap <String, NetMsg> m_wanted {}; // wanted messages
|
||||
HashMap <int32, NetMsg> m_reverseMap {}; // maps engine message id to our message id
|
||||
HashMap <int32_t, NetMsg> m_reverseMap {}; // maps engine message id to our message id
|
||||
|
||||
HashMap <NetMsg, int32, MsgHash> m_maps {}; // maps our message to id to engine message id
|
||||
HashMap <NetMsg, int32_t, MsgHash> m_maps {}; // maps our message to id to engine message id
|
||||
HashMap <NetMsg, MsgFunc, MsgHash> m_handlers {}; // maps our message id to handler function
|
||||
|
||||
private:
|
||||
|
|
@ -122,17 +122,17 @@ private:
|
|||
void netMsgScoreAttrib ();
|
||||
|
||||
private:
|
||||
Bot *pickBot (int32 index);
|
||||
Bot *pickBot (int32_t index);
|
||||
|
||||
public:
|
||||
MessageDispatcher ();
|
||||
~MessageDispatcher () = default;
|
||||
|
||||
public:
|
||||
int32 add (StringRef name, int32 id);
|
||||
int32 id (NetMsg msg);
|
||||
int32_t add (StringRef name, int32_t id);
|
||||
int32_t id (NetMsg msg);
|
||||
|
||||
void start (edict_t *ent, int32 type);
|
||||
void start (edict_t *ent, int32_t type);
|
||||
void stop ();
|
||||
void ensureMessages ();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue