From f073789ef3ef7d79c4c7a970135644df2123838f Mon Sep 17 00:00:00 2001 From: BotoX Date: Fri, 27 Sep 2019 13:04:30 +0200 Subject: [PATCH] use new OnEntitySpawned forward --- src/zombiereloaded.sp | 6 +++--- src/zr/napalm.inc | 13 +------------ 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/zombiereloaded.sp b/src/zombiereloaded.sp index b0522b1..1be0302 100644 --- a/src/zombiereloaded.sp +++ b/src/zombiereloaded.sp @@ -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); } /** diff --git a/src/zr/napalm.inc b/src/zr/napalm.inc index 429203f..590a9c2 100644 --- a/src/zr/napalm.inc +++ b/src/zr/napalm.inc @@ -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");