API: Add hooks ED_Alloc() and ED_Free()#227
Conversation
|
EDIT: I removed the lines that I believe caused compilation errors from rehlds_api.h. |
ED_Alloc() and ED_Free()
|
@DarthMan resolve conflicts please |
Sorry, I am not home for a few days, can't do anything about it now. But it's all about the SV_EmitPings and the SV_Connect whatever additions to the files, I guess. |
|
@DarthMan I got you. No problem, I'll update it myself. |
Sure, sounds good. |
85b29dc to
8e421a1
Compare
|
Can someone explain to me what is the practical meaning of the ED_Alloc hook for AMXX? We can't prevent the call, and we can't influence the entity at the moment of creation. |
|
@wopox1337 it's called when an entity is created. I use it in a plugin as post to add entity to array list, then on ED_Free post I check if it's in the array list, then I remove it from there if so. It's very usefull, as this way I can make sure that the entity id was valid before the entity got removed, and is not just a random number. |
Since people do not seem to care, I tried to add the hook myself, I am not sure if all is good but this should be.
So please control my work and merge it to the repository as soon as possible, because I need in emergency those hooks for some plugins I'm coding.
Also, if possible please:
Thanks!