entities.helpers module

Provides helper functions to convert from one type to another.

class entities.helpers.EntityMemFuncWrapper(wrapped_self, wrapper)[source]

Bases: memory.helpers.MemberFunction

__init__(wrapped_self, wrapper)[source]
call_trampoline(*args, **kwargs)[source]
skip_hooks(*args, **kwargs)[source]
entities.helpers.baseentity_from_basehandle((BaseEntityHandle)BaseHandle) → object :

Return the BaseEntity (of type “CBaseEntity *”) from the given BaseHandle (of type “CBaseHandle”).

entities.helpers.baseentity_from_edict((Edict)Edict) → object :

Return the BaseEntity (of type “CBaseEntity *”) from the given Edict (of type “edict_t *”).

entities.helpers.baseentity_from_index((int)Index) → object :

Return the BaseEntity (of type “CBaseEntity *”) from the given Index (of type “unsigned int”).

entities.helpers.baseentity_from_inthandle((int)IntHandle) → object :

Return the BaseEntity (of type “CBaseEntity *”) from the given IntHandle (of type “unsigned int”).

entities.helpers.baseentity_from_pointer((Pointer)Pointer) → object :

Return the BaseEntity (of type “CBaseEntity *”) from the given Pointer (of type “CPointer *”).

entities.helpers.basehandle_from_baseentity((object)BaseEntity) → BaseEntityHandle :

Return the BaseHandle (of type “CBaseHandle”) from the given BaseEntity (of type “CBaseEntity *”).

entities.helpers.basehandle_from_edict((Edict)Edict) → BaseEntityHandle :

Return the BaseHandle (of type “CBaseHandle”) from the given Edict (of type “edict_t *”).

entities.helpers.basehandle_from_index((int)Index) → BaseEntityHandle :

Return the BaseHandle (of type “CBaseHandle”) from the given Index (of type “unsigned int”).

entities.helpers.basehandle_from_inthandle((int)IntHandle) → BaseEntityHandle :

Return the BaseHandle (of type “CBaseHandle”) from the given IntHandle (of type “unsigned int”).

entities.helpers.basehandle_from_pointer((Pointer)Pointer) → BaseEntityHandle :

Return the BaseHandle (of type “CBaseHandle”) from the given Pointer (of type “CPointer *”).

entities.helpers.edict_from_baseentity((object)BaseEntity) → Edict :

Return the Edict (of type “edict_t *”) from the given BaseEntity (of type “CBaseEntity *”).

entities.helpers.edict_from_basehandle((BaseEntityHandle)BaseHandle) → Edict :

Return the Edict (of type “edict_t *”) from the given BaseHandle (of type “CBaseHandle”).

entities.helpers.edict_from_index((int)Index) → Edict :

Return the Edict (of type “edict_t *”) from the given Index (of type “unsigned int”).

entities.helpers.edict_from_inthandle((int)IntHandle) → Edict :

Return the Edict (of type “edict_t *”) from the given IntHandle (of type “unsigned int”).

entities.helpers.edict_from_pointer((Pointer)Pointer) → Edict :

Return the Edict (of type “edict_t *”) from the given Pointer (of type “CPointer *”).

entities.helpers.find_output_name((object)caller, (object)output) → str :

Lookup the name of an output.

If no name has been found, None will be returned.

entities.helpers.index_from_baseentity((object)BaseEntity) → int :

Return the Index (of type “unsigned int”) from the given BaseEntity (of type “CBaseEntity *”).

entities.helpers.index_from_basehandle((BaseEntityHandle)BaseHandle) → int :

Return the Index (of type “unsigned int”) from the given BaseHandle (of type “CBaseHandle”).

entities.helpers.index_from_edict((Edict)Edict) → int :

Return the Index (of type “unsigned int”) from the given Edict (of type “edict_t *”).

entities.helpers.index_from_inthandle((int)IntHandle) → int :

Return the Index (of type “unsigned int”) from the given IntHandle (of type “unsigned int”).

entities.helpers.index_from_pointer((Pointer)Pointer) → int :

Return the Index (of type “unsigned int”) from the given Pointer (of type “CPointer *”).

entities.helpers.inthandle_from_baseentity((object)BaseEntity) → int :

Return the IntHandle (of type “unsigned int”) from the given BaseEntity (of type “CBaseEntity *”).

entities.helpers.inthandle_from_basehandle((BaseEntityHandle)BaseHandle) → int :

Return the IntHandle (of type “unsigned int”) from the given BaseHandle (of type “CBaseHandle”).

entities.helpers.inthandle_from_edict((Edict)Edict) → int :

Return the IntHandle (of type “unsigned int”) from the given Edict (of type “edict_t *”).

entities.helpers.inthandle_from_index((int)Index) → int :

Return the IntHandle (of type “unsigned int”) from the given Index (of type “unsigned int”).

entities.helpers.inthandle_from_pointer((Pointer)Pointer) → int :

Return the IntHandle (of type “unsigned int”) from the given Pointer (of type “CPointer *”).

entities.helpers.pointer_from_baseentity((object)BaseEntity) → Pointer :

Return the Pointer (of type “CPointer”) from the given BaseEntity (of type “CBaseEntity *”).

entities.helpers.pointer_from_basehandle((BaseEntityHandle)BaseHandle) → Pointer :

Return the Pointer (of type “CPointer”) from the given BaseHandle (of type “CBaseHandle”).

entities.helpers.pointer_from_edict((Edict)Edict) → Pointer :

Return the Pointer (of type “CPointer”) from the given Edict (of type “edict_t *”).

entities.helpers.pointer_from_index((int)Index) → Pointer :

Return the Pointer (of type “CPointer”) from the given Index (of type “unsigned int”).

entities.helpers.pointer_from_inthandle((int)IntHandle) → Pointer :

Return the Pointer (of type “CPointer”) from the given IntHandle (of type “unsigned int”).

entities.helpers.wrap_entity_mem_func(wrapper)[source]

A decorator to wrap an entity memory function.