Fixed detection mp_freeforall for regamedll.

Added missing addon entities for regamedll.
Fixed bots keep adding to game event when there is now spawn points left on map.
Reduced a little bot difficulty at higher levels.
This commit is contained in:
jeefo 2019-05-13 21:41:14 +03:00
commit 5a7dbc2463
8 changed files with 110 additions and 30 deletions

View file

@ -607,7 +607,7 @@ public:
return;
}
#ifdef PLATFORM_WIN32
FreeLibrary ((HMODULE)m_ptr);
FreeLibrary (static_cast <HMODULE> (m_ptr));
#else
dlclose (m_ptr);
#endif

View file

@ -99,6 +99,7 @@ struct LangComprarer {
class Engine : public Singleton <Engine> {
private:
int m_drawModels[DRAW_NUM];
int m_spawnCount[TEAM_UNASSIGNED];
// bot client command
char m_arguments[256];
@ -243,6 +244,11 @@ public:
return m_startEntity;
}
// get spawn count for team
inline int getSpawnCount (int team) {
return m_spawnCount[team];
}
// gets the player team
inline int getTeam (edict_t *ent) {
extern Client g_clients[MAX_ENGINE_PLAYERS];

View file

@ -55,11 +55,12 @@ enum GameFlags {
GAME_LEGACY = (1 << 3), // counter-strike 1.3-1.5 with/without steam
GAME_MOBILITY = (1 << 4), // additional flag that bot is running on android (additional flag)
GAME_OFFICIAL_CSBOT = (1 << 5), // additional flag that indicates official cs bots are in game
GAME_METAMOD = (1 << 6), // game running under metamod
GAME_METAMOD = (1 << 6), // game running under meta\mod
GAME_CSDM = (1 << 7), // csdm mod currently in use
GAME_CSDM_FFA = (1 << 8), // csdm mod with ffa mode
GAME_SUPPORT_SVC_PINGS = (1 << 9), // on that game version we can fake bots pings
GAME_SUPPORT_BOT_VOICE = (1 << 10) // on that game version we can use chatter
GAME_REGAMEDLL = (1 << 9), // server dll is a regamedll
GAME_SUPPORT_SVC_PINGS = (1 << 10), // on that game version we can fake bots pings
GAME_SUPPORT_BOT_VOICE = (1 << 11) // on that game version we can use chatter
};
// bot menu ids
@ -1297,6 +1298,7 @@ private:
float m_entityUpdateTime; // time to update intresting entities
int m_lastWinner; // the team who won previous round
int m_lastDifficulty; // last bots difficulty
bool m_leaderChoosen[MAX_TEAM_COUNT]; // is team leader choose theese round
bool m_economicsGood[MAX_TEAM_COUNT]; // is team able to buy anything
@ -1371,6 +1373,7 @@ public:
void listBots (void);
void setWeaponMode (int selection);
void updateTeamEconomics (int team, bool setTrue = false);
void updateBotDifficulties (void);
static void execGameEntity (entvars_t *vars);