RevEmuAPI: Fix formatting
This commit is contained in:
parent
5ac6f94118
commit
a1a150db9f
@ -7,7 +7,7 @@ from ambuild2 import run
|
|||||||
builder = run.PrepareBuild(sourcePath = sys.path[0])
|
builder = run.PrepareBuild(sourcePath = sys.path[0])
|
||||||
|
|
||||||
builder.options.add_option('--hl2sdk-root', type=str, dest='hl2sdk_root', default=None,
|
builder.options.add_option('--hl2sdk-root', type=str, dest='hl2sdk_root', default=None,
|
||||||
help='Root search folder for HL2SDKs')
|
help='Root search folder for HL2SDKs')
|
||||||
builder.options.add_option('--mms-path', type=str, dest='mms_path', default=None,
|
builder.options.add_option('--mms-path', type=str, dest='mms_path', default=None,
|
||||||
help='Path to Metamod:Source')
|
help='Path to Metamod:Source')
|
||||||
builder.options.add_option('--sm-path', type=str, dest='sm_path', default=None,
|
builder.options.add_option('--sm-path', type=str, dest='sm_path', default=None,
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
* @brief Implement extension code here.
|
* @brief Implement extension code here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
RevEmuAPI g_RevEmuAPI; /**< Global singleton for extension's main interface */
|
RevEmuAPI g_RevEmuAPI; /**< Global singleton for extension's main interface */
|
||||||
|
|
||||||
SMEXT_LINK(&g_RevEmuAPI);
|
SMEXT_LINK(&g_RevEmuAPI);
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ static cell_t IsPlayerSteam(IPluginContext *pContext, const cell_t *params)
|
|||||||
{
|
{
|
||||||
if (!Rev_BGetPlayerInfoByUserID(pPlayer->GetUserId(), &PlayerInfo))
|
if (!Rev_BGetPlayerInfoByUserID(pPlayer->GetUserId(), &PlayerInfo))
|
||||||
{
|
{
|
||||||
PlayerInfo.m_ePlayerType = k_eUnknown;
|
PlayerInfo.m_ePlayerType = k_eInvalid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ static cell_t GetPlayerType(IPluginContext *pContext, const cell_t *params)
|
|||||||
{
|
{
|
||||||
if (!Rev_BGetPlayerInfoByUserID(pPlayer->GetUserId(), &PlayerInfo))
|
if (!Rev_BGetPlayerInfoByUserID(pPlayer->GetUserId(), &PlayerInfo))
|
||||||
{
|
{
|
||||||
PlayerInfo.m_ePlayerType = k_eUnknown;
|
PlayerInfo.m_ePlayerType = k_eInvalid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
enum RevEmu_UserType
|
enum RevEmu_UserType
|
||||||
{
|
{
|
||||||
Unknown = -1,
|
Invalid = -1,
|
||||||
SteamLegitUser = 0,
|
SteamLegitUser = 0,
|
||||||
SteamCrackedUser,
|
SteamCrackedUser,
|
||||||
RevEmuUser,
|
RevEmuUser,
|
||||||
RevEmuUserOld,
|
RevEmuUserOld,
|
||||||
@ -19,9 +19,9 @@ enum RevEmu_UserType
|
|||||||
/**
|
/**
|
||||||
* Check if clients usertype is legit.
|
* Check if clients usertype is legit.
|
||||||
*
|
*
|
||||||
* @param clients The client index.
|
* @param clients The client index.
|
||||||
*
|
*
|
||||||
* @return True if valid, false otherwise.
|
* @return True if valid, false otherwise.
|
||||||
* @error Invalid client index, not connected or fake client.
|
* @error Invalid client index, not connected or fake client.
|
||||||
*/
|
*/
|
||||||
native bool RevEmu_IsPlayerSteam(int client);
|
native bool RevEmu_IsPlayerSteam(int client);
|
||||||
@ -29,9 +29,9 @@ native bool RevEmu_IsPlayerSteam(int client);
|
|||||||
/**
|
/**
|
||||||
* Retrieve clients usertype.
|
* Retrieve clients usertype.
|
||||||
*
|
*
|
||||||
* @param clients The client index.
|
* @param clients The client index.
|
||||||
*
|
*
|
||||||
* @return The clients usertype.
|
* @return The clients usertype.
|
||||||
* @error Invalid client index, not connected or fake client.
|
* @error Invalid client index, not connected or fake client.
|
||||||
*/
|
*/
|
||||||
native RevEmu_UserType RevEmu_GetPlayerType(int client);
|
native RevEmu_UserType RevEmu_GetPlayerType(int client);
|
||||||
@ -39,25 +39,25 @@ native RevEmu_UserType RevEmu_GetPlayerType(int client);
|
|||||||
|
|
||||||
public Extension __ext_RevEmuAPI =
|
public Extension __ext_RevEmuAPI =
|
||||||
{
|
{
|
||||||
name = "RevEmuAPI",
|
name = "RevEmuAPI",
|
||||||
file = "RevEmuAPI.ext",
|
file = "RevEmuAPI.ext",
|
||||||
#if defined AUTOLOAD_EXTENSIONS
|
#if defined AUTOLOAD_EXTENSIONS
|
||||||
autoload = 1,
|
autoload = 1,
|
||||||
#else
|
#else
|
||||||
autoload = 0,
|
autoload = 0,
|
||||||
#endif
|
#endif
|
||||||
#if defined REQUIRE_EXTENSIONS
|
#if defined REQUIRE_EXTENSIONS
|
||||||
required = 1,
|
required = 1,
|
||||||
#else
|
#else
|
||||||
required = 0,
|
required = 0,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined REQUIRE_EXTENSIONS
|
#if !defined REQUIRE_EXTENSIONS
|
||||||
public __ext_RevEmuAPI_SetNTVOptional()
|
public __ext_RevEmuAPI_SetNTVOptional()
|
||||||
{
|
{
|
||||||
MarkNativeAsOptional("RevEmu_IsPlayerSteam");
|
MarkNativeAsOptional("RevEmu_IsPlayerSteam");
|
||||||
MarkNativeAsOptional("RevEmu_GetPlayerType");
|
MarkNativeAsOptional("RevEmu_GetPlayerType");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
12
revemu.h
12
revemu.h
@ -5,8 +5,8 @@ typedef uint64_t CSteamID;
|
|||||||
|
|
||||||
enum EUserType
|
enum EUserType
|
||||||
{
|
{
|
||||||
k_eUnknown = -1,
|
k_eInvalid = -1,
|
||||||
k_eSteamLegitUser = 0,
|
k_eSteamLegitUser = 0,
|
||||||
k_eSteamCrackedUser,
|
k_eSteamCrackedUser,
|
||||||
k_eRevEmuUser,
|
k_eRevEmuUser,
|
||||||
k_eRevEmuUserOld,
|
k_eRevEmuUserOld,
|
||||||
@ -20,10 +20,10 @@ enum EUserType
|
|||||||
|
|
||||||
struct PlayerInfo_t
|
struct PlayerInfo_t
|
||||||
{
|
{
|
||||||
unsigned int m_unUserID;
|
unsigned int m_unUserID;
|
||||||
CSteamID m_steamIDPlayer;
|
CSteamID m_steamIDPlayer;
|
||||||
EUserType m_ePlayerType;
|
EUserType m_ePlayerType;
|
||||||
unsigned int m_unIP;
|
unsigned int m_unIP;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef bool (*pRev_BGetPlayerInfoByUserID) ( unsigned int unUserID, PlayerInfo_t* pPlayerInfo );
|
typedef bool (*pRev_BGetPlayerInfoByUserID) ( unsigned int unUserID, PlayerInfo_t* pPlayerInfo );
|
||||||
|
Loading…
Reference in New Issue
Block a user