use new OnEntitySpawned forward
This commit is contained in:
parent
e4b208a27a
commit
f073789ef3
@ -397,14 +397,14 @@ public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:ang
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When an entity is created
|
* When an entity is spawned
|
||||||
*
|
*
|
||||||
* @param entity Entity index
|
* @param entity Entity index
|
||||||
* @param classname Class name
|
* @param classname Class name
|
||||||
*/
|
*/
|
||||||
public OnEntityCreated(entity, const String:classname[])
|
public OnEntitySpawned(entity, const String:classname[])
|
||||||
{
|
{
|
||||||
NapalmOnEntityCreated(entity, classname);
|
NapalmOnEntitySpawned(entity, classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -178,7 +178,7 @@ NapalmOnClientDeath(client)
|
|||||||
* @param entity Entity index
|
* @param entity Entity index
|
||||||
* @param classname Class name
|
* @param classname Class name
|
||||||
*/
|
*/
|
||||||
NapalmOnEntityCreated(entity, const String:classname[])
|
NapalmOnEntitySpawned(entity, const String:classname[])
|
||||||
{
|
{
|
||||||
// Not a grenade.
|
// Not a grenade.
|
||||||
if (strcmp(classname, "hegrenade_projectile", false))
|
if (strcmp(classname, "hegrenade_projectile", false))
|
||||||
@ -193,17 +193,6 @@ NapalmOnEntityCreated(entity, const String:classname[])
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hook entity spawn.
|
|
||||||
SDKHook(entity, SDKHook_SpawnPost, NapalmOnGrenadeSpawnPost);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after a grenade entity has been spawned.
|
|
||||||
*
|
|
||||||
* @param entity Entity index
|
|
||||||
*/
|
|
||||||
public NapalmOnGrenadeSpawnPost(entity)
|
|
||||||
{
|
|
||||||
// Get client who threw this grenade.
|
// Get client who threw this grenade.
|
||||||
new client = GetEntPropEnt(entity, Prop_Send, "m_hOwnerEntity");
|
new client = GetEntPropEnt(entity, Prop_Send, "m_hOwnerEntity");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user