Add GetPlayerResourceEntity to SDKTools; deprecate old, broken TF2-specific impl (bug 5491, r=asherkin).

This commit is contained in:
Nicholas Hastings
2013-03-16 13:50:36 -04:00
parent 9e540eb1c4
commit 0c7696da65
14 changed files with 157 additions and 29 deletions
+11
View File
@@ -1208,6 +1208,16 @@ static cell_t SetClientInfo(IPluginContext *pContext, const cell_t *params)
return 1;
}
static cell_t GetPlayerResourceEntity(IPluginContext *pContext, const cell_t *params)
{
if (gamehelpers->GetHandleEntity(g_ResourceEntity) != NULL)
{
return g_ResourceEntity.GetEntryIndex();
}
return -1;
}
sp_nativeinfo_t g_Natives[] =
{
{"ExtinguishEntity", ExtinguishEntity},
@@ -1235,5 +1245,6 @@ sp_nativeinfo_t g_Natives[] =
{"EquipPlayerWeapon", WeaponEquip},
{"ActivateEntity", ActivateEntity},
{"SetClientInfo", SetClientInfo},
{"GetPlayerResourceEntity", GetPlayerResourceEntity},
{NULL, NULL},
};