fixed crash on escaping from bomb on really small maps (de_iceworld ie)

reworked how yb_quota works
fixed engine is not notified about bot cvar is beeing changed
This commit is contained in:
jeefo 2016-06-23 15:30:19 +03:00
commit db79df8d38
9 changed files with 127 additions and 145 deletions

View file

@ -636,6 +636,7 @@ struct ExperienceSave
// bot creation tab
struct CreateQueue
{
bool console;
int difficulty;
int team;
int member;
@ -1203,9 +1204,8 @@ public:
void TryHeadTowardRadioEntity (void);
void Kill (void);
void Kick (void);
void Kick (bool keepQuota = false);
void ResetDoubleJumpState (void);
void MoveToVector (const Vector &to);
int FindPlantedBomb(void);
bool HasHostage (void);
@ -1248,7 +1248,7 @@ private:
edict_t *m_killerEntity; // killer entity for bots
protected:
int CreateBot (const String &name, int difficulty, int personality, int team, int member);
int CreateBot (const String &name, int difficulty, int personality, int team, int member, bool isConsoleCmd);
public:
BotManager (void);
@ -1280,13 +1280,13 @@ public:
void Free (void);
void Free (int index);
void AddRandom (void) { AddBot ("", -1, -1, -1, -1); }
void AddBot (const String &name, int difficulty, int personality, int team, int member);
void AddBot (const String &name, const String &difficulty, const String &personality, const String &team, const String &member);
void AddRandom (bool isConsoleCmd = true) { AddBot ("", -1, -1, -1, -1, isConsoleCmd); }
void AddBot (const String &name, int difficulty, int personality, int team, int member, bool isConsoleCmd = true);
void AddBot (const String &name, const String &difficulty, const String &personality, const String &team, const String &member, bool isConsoleCmd = true);
void FillServer (int selection, int personality = PERSONALITY_NORMAL, int difficulty = -1, int numToAdd = -1);
void RemoveAll (bool zeroQuota = true);
void RemoveRandom (void);
void RemoveAll (void);
void RemoveRandom (bool keepQuota = false);
void RemoveFromTeam (Team team, bool removeAll = false);
void RemoveMenu (edict_t *ent, int selection);
void KillAll (int team = -1);

View file

@ -318,7 +318,7 @@ public:
FORCEINLINE int GetInt (void) { return static_cast <int> (m_eptr->value); }
FORCEINLINE float GetFloat (void) { return m_eptr->value; }
FORCEINLINE const char *GetString (void) { return m_eptr->string; }
FORCEINLINE void SetFloat (float val) { m_eptr->value = val; }
FORCEINLINE void SetFloat (float val) { g_engfuncs.pfnCVarSetFloat (m_eptr->name, val); }
FORCEINLINE void SetInt (int val) { SetFloat (static_cast <float> (val)); }
FORCEINLINE void SetString (const char *val) { g_engfuncs.pfnCvar_DirectSet (m_eptr, const_cast <char *> (val)); }
};

View file

@ -20,7 +20,6 @@ extern bool g_autoWaypoint;
extern bool g_botsCanPause;
extern bool g_editNoclip;
extern bool g_isMetamod;
extern bool g_sendAudioFinished;
extern bool g_isCommencing;
extern bool g_leaderChoosen[2];