Updated for latest hl2sdk-dota changes.

This commit is contained in:
Nicholas Hastings
2013-05-13 15:18:12 -04:00
parent e8dc1480eb
commit 614967ccc1
17 changed files with 228 additions and 29 deletions
+8 -1
View File
@@ -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;
};
/**
+22
View File
@@ -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_