added amb1620 - ActivateEntity

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402068
This commit is contained in:
David Anderson 2008-04-16 23:29:03 +00:00
parent 726aa68be9
commit 946834b868
3 changed files with 103 additions and 3 deletions

View File

@ -894,6 +894,28 @@ static cell_t WeaponEquip(IPluginContext *pContext, const cell_t *params)
return 1; return 1;
} }
static cell_t ActivateEntity(IPluginContext *pContext, const cell_t *params)
{
static ValveCall *pCall = NULL;
if (!pCall)
{
if (!CreateBaseCall("Activate", ValveCall_Entity, NULL, NULL, 0, &pCall))
{
return pContext->ThrowNativeError("\"Activate\" not supported by this mod");
}
else if (!pCall)
{
return pContext->ThrowNativeError("\"Activate\" wrapper failed to initialized");
}
}
START_CALL();
DECODE_VALVE_PARAM(1, thisinfo, 0);
FINISH_CALL_SIMPLE(NULL);
return 1;
}
sp_nativeinfo_t g_Natives[] = sp_nativeinfo_t g_Natives[] =
{ {
{"ExtinguishEntity", ExtinguishEntity}, {"ExtinguishEntity", ExtinguishEntity},
@ -919,5 +941,6 @@ sp_nativeinfo_t g_Natives[] =
{"GetPlayerDecalFile", GetPlayerDecalFile}, {"GetPlayerDecalFile", GetPlayerDecalFile},
{"GetServerNetStats", GetServerNetStats}, {"GetServerNetStats", GetServerNetStats},
{"EquipPlayerWeapon", WeaponEquip}, {"EquipPlayerWeapon", WeaponEquip},
{"ActivateEntity", ActivateEntity},
{NULL, NULL}, {NULL, NULL},
}; };

View File

@ -337,6 +337,11 @@
"windows" "217" "windows" "217"
"linux" "218" "linux" "218"
} }
"Activate"
{
"windows" "32"
"linux" "33"
}
} }
} }
@ -420,6 +425,11 @@
"windows" "217" "windows" "217"
"linux" "218" "linux" "218"
} }
"Activate"
{
"windows" "32"
"linux" "33"
}
} }
} }
@ -503,6 +513,11 @@
"windows" "217" "windows" "217"
"linux" "218" "linux" "218"
} }
"Activate"
{
"windows" "32"
"linux" "33"
}
} }
} }
@ -587,6 +602,11 @@
"windows" "211" "windows" "211"
"linux" "212" "linux" "212"
} }
"Activate"
{
"windows" "37"
"linux" "38"
}
/* Temp Entities */ /* Temp Entities */
"TE_GetServerClass" "TE_GetServerClass"
@ -695,6 +715,11 @@
"windows" "220" "windows" "220"
"linux" "221" "linux" "221"
} }
"Activate"
{
"windows" "32"
"linux" "33"
}
/* Offset into CBaseTempEntity constructor. /* Offset into CBaseTempEntity constructor.
* On Windows Dsytopia is heavily inlined; we use the function * On Windows Dsytopia is heavily inlined; we use the function
@ -792,6 +817,11 @@
"windows" "215" "windows" "215"
"linux" "216" "linux" "216"
} }
"Activate"
{
"windows" "31"
"linux" "32"
}
} }
} }
@ -876,6 +906,11 @@
"windows" "217" "windows" "217"
"linux" "218" "linux" "218"
} }
"Activate"
{
"windows" "32"
"linux" "33"
}
} }
} }
@ -1055,6 +1090,11 @@
"windows" "227" "windows" "227"
"linux" "228" "linux" "228"
} }
"Activate"
{
"windows" "36"
"linux" "37"
}
} }
"Signatures" "Signatures"
@ -1227,6 +1267,11 @@
"windows" "221" "windows" "221"
"linux" "222" "linux" "222"
} }
"Activate"
{
"windows" "32"
"linux" "33"
}
/* Offset into LevelShutdown for CGlobalEntList */ /* Offset into LevelShutdown for CGlobalEntList */
"gEntList" "gEntList"
@ -1326,6 +1371,11 @@
"windows" "217" "windows" "217"
"linux" "218" "linux" "218"
} }
"Activate"
{
"windows" "32"
"linux" "33"
}
} }
} }
@ -1410,6 +1460,11 @@
"windows" "217" "windows" "217"
"linux" "218" "linux" "218"
} }
"Activate"
{
"windows" "32"
"linux" "33"
}
} }
} }
@ -1484,7 +1539,11 @@
"windows" "25" "windows" "25"
"linux" "26" "linux" "26"
} }
"Activate"
{
"windows" "32"
"linux" "33"
}
"TE_GetServerClass" "TE_GetServerClass"
{ {
"windows" "0" "windows" "0"
@ -1597,6 +1656,11 @@
"windows" "198" "windows" "198"
"linux" "199" "linux" "199"
} }
"Activate"
{
"windows" "32"
"linux" "33"
}
} }
"Signatures" "Signatures"
@ -1721,6 +1785,11 @@
"windows" "219" "windows" "219"
"linux" "220" "linux" "220"
} }
"Activate"
{
"windows" "32"
"linux" "33"
}
} }
"Signatures" "Signatures"
{ {

View File

@ -289,7 +289,6 @@ native bool:GetPlayerDecalFile(client, String:hex[], maxlength);
*/ */
native GetServerNetStats(&Float:in, &Float:out); native GetServerNetStats(&Float:in, &Float:out);
/** /**
* Equip's a player's weapon. * Equip's a player's weapon.
* *
@ -300,3 +299,12 @@ native GetServerNetStats(&Float:in, &Float:out);
* game. * game.
*/ */
native EquipPlayerWeapon(client, weapon); native EquipPlayerWeapon(client, weapon);
/**
* Activates an entity (CBaseAnimating::Activate)
*
* @param entity Entity index.
* @noreturn
* @error Invalid entity or lack of mod support.
*/
native ActivateEntity(entity);