Quote:
Originally Posted by TheAvenger
It's really late here so I'll just give a quick reply (I have an additional question but that one
requires more thorough explanation); is that really necessary? I didn't know about the edict_t
pContainaingEntity member variable, but now that I do, I have no problems what so ever!
I've just defined a simple CBasePlayer structure (which I convert pvPrivateData to)
and access the entvars directly. For example:
Code:
((CBasePlayer*)pEnt->pvPrivateData)->pev->pContainaingEntity
With that code, its work excellent without any segmentations faults! But since your code is much
more extensive, is there a reason behind it? Or why haven't you just called entvars directly to
access pContainingEntity?
Thanks so much for all help btw!
|
The thing is: the offset of the pev member in classes is compilation dependent and maybe mod dependent. If you check hamdata.ini in an amxmodx installation you can see:
Code:
@section cstrike linux
pev 0
@section cstrike windows
pev 4
So, if you plan on doing stuff only for cstrike linux is ok to assume 0.