removed metamod-messages, since there will be nor updates to metamod ifaces.
This commit is contained in:
parent
6136bace18
commit
95d9d4db0c
15 changed files with 259 additions and 268 deletions
|
|
@ -1551,5 +1551,5 @@ extern ConVar yb_ignore_enemies;
|
|||
|
||||
inline int Bot::GetIndex (void)
|
||||
{
|
||||
return IndexOfEntity (GetEntity ());
|
||||
return engine.IndexOfEntity (GetEntity ());
|
||||
}
|
||||
|
|
@ -66,11 +66,14 @@ private:
|
|||
char m_arguments[256];
|
||||
int m_argumentCount;
|
||||
|
||||
edict_t *m_startEntity;
|
||||
edict_t *m_localEntity;
|
||||
|
||||
// public functions
|
||||
public:
|
||||
|
||||
// precaches internal stuff
|
||||
void Precache (void);
|
||||
void Precache (edict_t *startEntity);
|
||||
|
||||
// prints data to servers console
|
||||
void Printf (const char *fmt, ...);
|
||||
|
|
@ -164,6 +167,32 @@ public:
|
|||
return m_argumentCount;
|
||||
}
|
||||
|
||||
inline edict_t *EntityOfIndex (const int index)
|
||||
{
|
||||
return static_cast <edict_t *> (m_startEntity + index);
|
||||
};
|
||||
|
||||
inline int IndexOfEntity (const edict_t *ent)
|
||||
{
|
||||
return static_cast <int> (ent - m_startEntity);
|
||||
};
|
||||
|
||||
inline bool IsNullEntity (const edict_t *ent)
|
||||
{
|
||||
return !ent || !IndexOfEntity (ent);
|
||||
}
|
||||
|
||||
inline int GetTeam (edict_t *ent)
|
||||
{
|
||||
extern Client g_clients[32];
|
||||
|
||||
#ifndef XASH_CSDM
|
||||
return g_clients[IndexOfEntity (ent) - 1].team;
|
||||
#else
|
||||
return g_clients[IndexOfEntity (ent) - 1].team = ent->v.team == 1 ? TERRORIST : CT;
|
||||
#endif
|
||||
}
|
||||
|
||||
// static utility functions
|
||||
public:
|
||||
static const char *ExtractSingleField (const char *string, int id, bool terminate);
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ extern TaskItem g_taskFilters[];
|
|||
extern Experience *g_experienceData;
|
||||
|
||||
extern edict_t *g_hostEntity;
|
||||
extern edict_t *g_worldEntity;
|
||||
extern Library *g_gameLib;
|
||||
|
||||
extern gamefuncs_t g_functionTable;
|
||||
|
|
@ -85,32 +84,3 @@ static inline bool IsNullString (const char *input)
|
|||
|
||||
return *input == '\0';
|
||||
}
|
||||
|
||||
static inline edict_t *EntityOfIndex (const int index)
|
||||
{
|
||||
return static_cast <edict_t *> (g_worldEntity + index);
|
||||
};
|
||||
|
||||
static inline int IndexOfEntity(const edict_t *ent)
|
||||
{
|
||||
return static_cast <int> (ent - g_worldEntity);
|
||||
};
|
||||
|
||||
static inline int EntOffsetOfEntity(const edict_t *ent)
|
||||
{
|
||||
return (char *) ent - (char *) g_worldEntity;
|
||||
}
|
||||
|
||||
static inline bool IsNullEntity (const edict_t *ent)
|
||||
{
|
||||
return !ent || !EntOffsetOfEntity (ent);
|
||||
}
|
||||
|
||||
static inline int GetTeam (edict_t *ent)
|
||||
{
|
||||
#ifndef XASH_CSDM
|
||||
return g_clients[IndexOfEntity (ent) - 1].team;
|
||||
#else
|
||||
return g_clients[IndexOfEntity (ent) - 1].team = ent->v.team == 1 ? TERRORIST : CT;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
#define PRODUCT_EMAIL "dmitry@jeefo.net"
|
||||
#define PRODUCT_LOGTAG "YAPB"
|
||||
#define PRODUCT_DESCRIPTION PRODUCT_NAME " v" PRODUCT_VERSION " - The Counter-Strike Bot"
|
||||
#define PRODUCT_COPYRIGHT "Copyright © 2003-2016, by " PRODUCT_AUTHOR
|
||||
#define PRODUCT_COPYRIGHT "Copyright © 2003-2016, by " PRODUCT_AUTHOR
|
||||
#define PRODUCT_LEGAL "Half-Life, Counter-Strike, Counter-Strike: Condition Zero, Steam, Valve is a trademark of Valve Corporation"
|
||||
#define PRODUCT_ORIGINAL_NAME "yapb.dll"
|
||||
#define PRODUCT_INTERNAL_NAME "skybot"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue