use new OnEntitySpawned forward

This commit is contained in:
BotoX 2019-09-27 13:04:30 +02:00
parent e4b208a27a
commit f073789ef3
2 changed files with 4 additions and 15 deletions

View File

@ -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 classname Class name
*/
public OnEntityCreated(entity, const String:classname[])
public OnEntitySpawned(entity, const String:classname[])
{
NapalmOnEntityCreated(entity, classname);
NapalmOnEntitySpawned(entity, classname);
}
/**

View File

@ -178,7 +178,7 @@ NapalmOnClientDeath(client)
* @param entity Entity index
* @param classname Class name
*/
NapalmOnEntityCreated(entity, const String:classname[])
NapalmOnEntitySpawned(entity, const String:classname[])
{
// Not a grenade.
if (strcmp(classname, "hegrenade_projectile", false))
@ -193,17 +193,6 @@ NapalmOnEntityCreated(entity, const String:classname[])
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.
new client = GetEntPropEnt(entity, Prop_Send, "m_hOwnerEntity");