Updated for latest hl2sdk-dota changes.
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
#include <IAdminSystem.h>
|
||||
|
||||
#define SMINTERFACE_PLAYERMANAGER_NAME "IPlayerManager"
|
||||
#define SMINTERFACE_PLAYERMANAGER_VERSION 17
|
||||
#define SMINTERFACE_PLAYERMANAGER_VERSION 18
|
||||
|
||||
struct edict_t;
|
||||
class IPlayerInfo;
|
||||
@@ -246,6 +246,13 @@ namespace SourceMod
|
||||
* @return Steam account ID or 0 if not available.
|
||||
*/
|
||||
virtual unsigned int GetSteamAccountID(bool validated = true) =0;
|
||||
|
||||
/**
|
||||
* @brief Returns the client's edict/entity index.
|
||||
*
|
||||
* @return Client's index.
|
||||
*/
|
||||
virtual int GetIndex() const =0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -154,4 +154,26 @@
|
||||
}
|
||||
#endif //SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||
|
||||
#if SOURCE_ENGINE == SE_DOTA
|
||||
inline int GetPlayerUserId(edict_t *pEdict)
|
||||
{
|
||||
return engine->GetPlayerUserId(IndexOfEdict(pEdict) - 1);
|
||||
}
|
||||
|
||||
inline int GetPlayerUserId(int client)
|
||||
{
|
||||
engine->GetPlayerUserId(client - 1);
|
||||
}
|
||||
#else
|
||||
inline int GetPlayerUserId(edict_t *pEdict)
|
||||
{
|
||||
return engine->GetPlayerUserId(pEdict);
|
||||
}
|
||||
|
||||
inline int GetPlayerUserId(int client)
|
||||
{
|
||||
return engine->GetPlayerUserId(PEntityOfEntIndex(client));
|
||||
}
|
||||
#endif //SOURCE_ENGINE >= SE_DOTA
|
||||
|
||||
#endif //_INCLUDE_SOURCEMOD_COMPAT_WRAPPERS_H_
|
||||
|
||||
Reference in New Issue
Block a user