i_client_entity_list
Provides access to all client-side entities in the game world. Source:game/sdk/classes/i_client_entity_list.h:13
Virtual Methods
Gets the networkable interface for an entity by indexParameters:
index- Entity index (1-64 for players, 0+ for all entities)
Gets the networkable interface from an entity handleParameters:
handle- Entity handle
Gets the unknown interface from an entity handleParameters:
handle- Entity handle
Gets the total number of entitiesParameters:
include_non_networkable- Whether to include non-networked entities
Gets the highest valid entity indexReturns: Maximum entity index in useVirtual Index: 7
Template Methods
Gets an entity by index and casts it to the specified typeTemplate Parameter:
T - Entity type to cast toParameters:index- Entity index
TThis is a templated wrapper around the private
private_get_client_entity method that provides type-safe casting.Gets an entity from a handle and casts it to the specified typeTemplate Parameter:
T - Entity type to cast toParameters:handle- Entity handle
Ti_engine_trace
Provides ray tracing and collision detection functionality. Source:game/sdk/classes/i_engine_trace.h:197
Classes and Structures
ray_t
Represents a ray for collision tracing. Source:game/sdk/classes/i_engine_trace.h:11
Starting position of the ray (16-byte aligned)
Direction and distance vector (16-byte aligned)
Offset from start position (16-byte aligned)
Half-size of bounding box for swept box traces (16-byte aligned)
true if this is a ray, false if it’s a swept boxtrue if the ray has non-zero lengthInitialize a ray trace from start to endParameters:
m_start- Start positionm_end- End position
c_game_trace
Contains results from a trace operation. Source:game/sdk/classes/i_engine_trace.h:87
Inherits: c_base_trace
Fraction of trace completed (0.0 to 1.0, where 1.0 = no hit)
Fraction when leaving solid space
Surface properties of what was hit
Hitgroup that was hit (head, chest, etc.)
Entity that was hit
Hitbox index that was hit
Checks if the trace hit anythingReturns:
true if trace hit something (fraction < 1 or started in solid)Checks if trace hit the world (static geometry)Returns:
true if world was hitChecks if trace hit an entity (not world)Returns:
true if entity was hitChecks if trace endpoint is visible (fraction > 0.97)Returns:
true if mostly visibleTrace Filters
c_trace_filter Basic trace filter that skips a single entity.Virtual Methods
Gets the contents mask at a pointParameters:
vec_abs_pos- World position to checkcontent_mask- Contents mask filter (default: MASK_ALL)entity- Optional pointer to receive entity at point
Performs a ray traceParameters:
ray- Ray to tracefmask- Contents mask (MASK_PLAYERSOLID, MASK_SHOT, etc.)trace_filter- Filter to skip entitiestrace- Output trace results
Traces a ray against a specific entityParameters:
ray- Ray to tracefmask- Contents maskentity- Specific entity to trace againsttrace- Output trace results
iv_engine_client
Main engine client interface providing access to game state, player info, and engine functions. Source:game/sdk/classes/iv_engine_client.h:8
Methods
Gets the screen dimensionsParameters:
w- Output widthh- Output height
Gets player information by indexParameters:
index- Player indexinfo- Output player info structure
true if player info was retrievedVirtual Index: 8Gets the local player’s entity indexReturns: Local player indexVirtual Index: 12
Gets the current view anglesReturns: Reference to view anglesVirtual Index: 18
Sets the view anglesParameters:
ang- New view angles
Gets the maximum number of clients/playersReturns: Max client count (typically 64)Virtual Index: 20
Checks if currently in a gameReturns:
true if in gameVirtual Index: 26Checks if connected to a serverReturns:
true if connectedVirtual Index: 27Checks if fully connected (connected, in game, not watching demo)Returns:
true if fully connectedGets the world-to-screen transformation matrixReturns: 4x4 transformation matrixVirtual Index: 37
Gets the current map name (full path)Returns: Map name stringVirtual Index: 52
Gets the current map name (short version)Returns: Short map nameVirtual Index: 53
Executes a client commandParameters:
st- Command string
Executes an unrestricted client command (bypasses some restrictions)Parameters:
st- Command stringfrom_console_or_keybind- Whether command is from console/keybind
i_material_system
Material system interface for texture and material management. Source:game/sdk/classes/i_material_system.h:9
Methods
Finds a material by nameParameters:
name- Material namegroup_name- Material group (optional)complain- Log error if not found (default: true)complain_prefix- Error message prefix (optional)
nullptrVirtual Index: 84Finds a texture by nameParameters:
name- Texture namegroup_name- Texture groupcomplain- Log error if not found (default: true)unk- Unknown parameter (default: 1)
nullptrVirtual Index: 91Gets the material render context for rendering operationsReturns: Render context pointerVirtual Index: 115