entities.helpers module

Provides helper functions to convert from one type to another.

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

Bases: MemberFunction

__init__(wrapped_self, wrapper)[source]

Initialize the instance.

call_trampoline(*args, **kwargs)[source]

Call the trampoline dynamically.

skip_hooks(*args, **kwargs)[source]

Call the function, but skip hooks if there are any.

entities.helpers.baseentity_from_basehandle((_entities.BaseEntityHandle)BaseHandle) object :

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

entities.helpers.baseentity_from_edict((_entities.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((_memory.Pointer)Pointer) object :

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

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

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

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

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

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

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

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

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

entities.helpers.basehandle_from_pointer((_memory.Pointer)Pointer) _entities.BaseEntityHandle :

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

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

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

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

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

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

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

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

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

entities.helpers.edict_from_pointer((_memory.Pointer)Pointer) _entities.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((_entities.BaseEntityHandle)BaseHandle) int :

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

entities.helpers.index_from_edict((_entities.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((_memory.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((_entities.BaseEntityHandle)BaseHandle) int :

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

entities.helpers.inthandle_from_edict((_entities.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((_memory.Pointer)Pointer) int :

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

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

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

entities.helpers.pointer_from_basehandle((_entities.BaseEntityHandle)BaseHandle) _memory.Pointer :

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

entities.helpers.pointer_from_edict((_entities.Edict)Edict) _memory.Pointer :

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

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

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

entities.helpers.pointer_from_inthandle((int)IntHandle) _memory.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.