Im in need of retrieving an entity which is stored as an EHANDLE, however it doesn't seem possible to retrieve it with get_pdata_ent() (returns -1) as it doesn't handle the conversion back to CBase, get_pdata_int() returns what seems like a pointer however.
So I need a method for converting an EHANDLE back to a CBaseEntity pointer and then getting the entity index. This is otherwise handled by these functions in CBase: