CBaseEntity: Difference between revisions

From SigMod
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:


'''Source location :  [https://github.com/sreechar/TF2-Source-Code/blob/master/tf2_src/game/server/baseentity.h /game/server/baseentity.h]'''
'''Source location :  [https://github.com/sreechar/TF2-Source-Code/blob/master/tf2_src/game/server/baseentity.h /game/server/baseentity.h]'''
'''VScript : [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions#CBaseEntity Script_Functions#CBaseEntity]'''
'''Lua : [https://github.com/rafradek/sigsegv-mvm/blob/4b2b8e63ca8b3f09c16ed0dcceea955e5ee365b7/scripts/library.lua#L61 scripts/library.lua#L61]'''


Go back to [[Classes]]
Go back to [[Classes]]

Latest revision as of 12:56, 17 September 2023

Overview[edit | edit source]

The class from which all entity types derive from. The only exceptions to this are TempEnts, which are temporary entities that are too simple to warrant the overhead of inheriting from CBaseEntity.

Source location : /game/server/baseentity.h

VScript : Script_Functions#CBaseEntity

Lua : scripts/library.lua#L61

Go back to Classes

SendProps[edit | edit source]

CBaseEntity
Name Type Description
AnimTimeMustBeFirst
m_flAnimTime Integer TBD
m_flSimulationTime Integer
m_vecOrigin Vector The local position of this entity relative to it's parent. If this entity has no parent, the position is relative to the world origin.
m_ubInterpolationFrame Integer
m_nModelIndex Short The index for this entity's precached model. Changing this does nothing in TF2.
m_Collision
m_vecMinsPreScaled Vector The mins coordinate point for the Collision bounding box of this entity before any changes are made to it, such as through the modelscale keyvalue.
m_vecMaxsPreScaled Vector The maxs coordinate point for the Collision bounding box of this entity before any changes are made to it, such as through the modelscale keyvalue.
m_vecMins Vector The mins coordinate point for the Collision bounding box of this entity after any changes are made to it, such as through the modelscale keyvalue.
m_vecMaxs Vector The maxs coordinate point for the Collision bounding box of this entity after any changes are made to it, such as through the modelscale keyvalue.
m_nSolidType Unsigned Char Determines the type of collision representation for the entity's bounding volume.
Values

/public/const.h#L235

  • 0 - Non-solid
  • 1 - A BSP tree (QPhysics)
  • 2 - Bounding Box
  • 3 - Oriented Bounding Box
  • 4 - Oriented Bounding Box constrained to only rotate along the yaw axis
  • 5 - Always call into the entity for tests
  • 6 - Solid VPhysics object, get vcollide from the model and collide with that
m_usSolidFlags Unsigned Short Entity solidity bit flags.
Values

/public/const.h#L247

  • 0 - None
  • 1 - Ignore solid type + always call into this entity for ray tests
  • 2 - Ignore solid type + always call into this entity for swept box tests
  • 4 - Are we currently not solid?
  • 8 - This is something may be collideable but fires touch functions even when it's not collideable (when the FSOLID_NOT_SOLID (4) flag is set)
  • 16 - You can't stand on this
  • 32 - Contains volumetric contents (like water)
  • 64 - Forces the collision rep to be world-aligned even if it's SOLID_BSP or SOLID_VPHYSICS
  • 128 - Uses a special trigger bounds separate from the normal OBB
  • 256 - Collisions are defined in root parent's local coordinate space
  • 512 - This trigger will touch debris objects
m_nSurroundType Unsigned Char
m_triggerBloat Unsigned Char
m_bUniformTriggerBloat Boolean Not in source?
m_vecSpecifiedSurroundingMinsPreScaled Vector
m_vecSpecifiedSurroundingMaxsPreScaled Vector
m_vecSpecifiedSurroundingMins Vector
m_vecSpecifiedSurroundingMaxs Vector
m_nRenderFX Unsigned Char Alpha render effects enum.
Values

/public/const.h#L367

  • 0 - None
  • 1 - Slow Pulse (varies alpha by ±16 over a period of 1.5 s)
  • 2 - Fast Pulse (varies alpha by ±16 over a period of 0.4 s)
  • 3 - Slow Wide Pulse (varies alpha by ±64 over a period of 1.5 s)
  • 4 - Fast Wide Pulse (varies alpha by ±64 over a period of 0.4 s)
  • 5 - Slow Fade Away (decreases alpha by -1 per frame, fades out over 4 s)
  • 6 - Fast Fade Away (decreases alpha by -4 per frame, fades out over 1 s)
  • 7 - Slow Become Solid (increases alpha by +1 per frame, fades in over 4 s)
  • 8 - Fast Become Solid (increases alpha by +4 per frame, fades in over 1 s)
  • 9 - Slow Strobe (transparent 0.8 s, visible 0.8 s, repeat)
  • 10 - Fast Strobe (transparent 0.2 s, visible 0.2 s, repeat)
  • 11 - Faster Strobe (transparent 0.09 s, visible 0.09 s, repeat)
  • 12 - Slow Flicker (transparent 0.18 s, visible 1.5 s, repeat)
  • 13 - Fast Flicker (transparent 0.14 s, visible 0.2 s, repeat)
  • 14 - Constant Glow ("NoDissipation;" purpose uncertain—for sprites?)
  • 15 - Distort (causes unnatural flickering and position shifting), Fade Out (instant; not very useful outside of code)
  • 16 - Hologram (Distort + "distance fade"), Fade In (instant; not very useful outside of code)
  • 17 - Scale Up ("Explode"/"scale up really big!" causes wild stretching of model parts), Fade Wider Pulse (varies alpha by ±255 over a period over a period of 0.26 s)
  • 18 - Glow Shell (purpose unclear)
  • 19 - Clamp Minimum Scale ("keep this sprite from getting very small (SPRITES only!)")
  • 20 - Environmental Rain ("for environmental rendermode, make rain")
  • 21 - Environmental Snow ("for environmental rendermode, make snow")
  • 22 - Spotlight FX ("TEST CODE for experimental spotlight")
  • 23 - Ragdoll ("HACKHACK: TEST CODE for signalling death of a ragdoll character;" ragdolls an entity but doesn't kill it)
  • 24 - Fade Wider Pulse (varies alpha by ±255 over a period of 0.26 s)
m_nRenderMode Unsigned Char The mode in which this entity should attempt to be rendered.
Values

/public/const.h#L350

  • 0 - Normal
  • 1 - Color
  • 2 - Texture
  • 3 - Glow
  • 4 - Solid/Alphatest
  • 5 - Additive
  • 6 - Removed, does nothing
  • 7 - Additive Fractional Frame
  • 8 - Alpha Add
  • 9 - World Space Glow
  • 10 - Don't Render
m_fEffects Integer Entity effects bit flags.
Values

/public/const.h#L281

  • 1 - Performs bone merge on client side
  • 2 - Dynamic Light centered at entity origin
  • 4 - Player flashlight
  • 8 - Don't interpolate the next frame
  • 16 - Don't cast shadows
  • 32 - Don't draw entity
  • 64 - Don't receive shadows
  • 128 - For use with EF_BONEMERGE. If this is set, then it places this ent's origin at its parent and uses the parent's bbox + the max extents of the aiment. Otherwise, it sets up the parent's bones every frame to figure out where to place the aiment, which is inefficient because it'll setup the parent's bones even if the parent is not in the PVS.
  • 256 - Blink an item so that the user notices it
  • 512 - Always assume that the parent entity is animating
m_clrRender Integer An integer representing the RGB render color of this entity.
Calculating The Value
RGB values can range from 0 to 255 individually, meaning the highest value can be represented by 8 bits. The integer used by this property is simply constructed from the bits of these values side by side. Starting from the right the first 8 bits (0-7) are used for blue, then the next 8 bits (8-15) are used by green, and finally the last 8 (16-23) are used by red. To convert your RGB color to an integer using this system, open the developer console in your browser by pressing F12, go to the Console tab, and type this:
(red << 16) + (green << 8) + blue

Where red green and blue are your RGB values, if a value is zero, you can just omit it, for example: (255 << 16) + 255 // = RGB(255, 0, 255)

m_iTeamNum Integer The team this entity is a part of.
Values
  • 0 - None
  • 1 - Spectator
  • 2 - RED
  • 3 - BLU
  • 5 - Boss / Neutral
m_CollisionGroup Integer Modifies what this entity collides with.
Values

/public/const.h#L397

  • 0 - None
  • 1 - Collides with nothing but world and static stuff
  • 2 - Same as debris, but hits triggers
  • 3 - Collides with everything except other interactive debris or debris
  • 4 - Collides with everything except interactive debris or debris
  • 5 - COLLISION_GROUP_PLAYER,
  • 6 - COLLISION_GROUP_BREAKABLE_GLASS,
  • 7 - COLLISION_GROUP_VEHICLE,
  • 8 - For HL2, same as Collision_Group_Player, for TF2, this filters out other players and CBaseObjects
  • 9 - Generic NPC group
  • 10 - For any entity inside a vehicle
  • 11 - For any weapons that need collision detection
  • 12 - Vehicle clip brush to restrict vehicle movement
  • 13 - Projectiles!
  • 14 - Blocks entities not permitted to get near moving doors
  • 15 - Doors that the player shouldn't collide with
  • 16 - Things that are dissolving are in this group
  • 17 - Nonsolid on client and server, pushaway in player code
  • 18 - Used so NPCs in scripts ignore the player.
  • 19 - Used for NPCs in scripts that should not collide with each other
  • 20 - TFCOLLISION_GROUP_SHIELD
  • 21 - TFCOLLISION_GROUP_WEAPON
  • 22 - TFCOLLISION_GROUP_GRENADE
  • 23 - TFCOLLISION_GROUP_RESOURCE_CHUNK
  • 24 - Combat objects (override for above)
  • 25 - TFCOLLISION_GROUP_OBJECT
  • 26 - TFCOLLISION_GROUP_OBJECT_SOLIDTOPLAYERMOVEMENT
m_flElasticity Float
m_flShadowCastDistance Float
m_hOwnerEntity Handle The owner of this entity, not to be confused with the parent (moveparent). A common example of ownership is players owning the projectiles that they fire. Some entities may not work properly if you create them without giving them an owner.
m_hEffectEntity Handle The entity which is used to affect this one. (Ignite/Dissolve)
moveparent String The immediate parent of this entity in the movement hierarchy. The targetname of the parent is used, rather than a Handle to the parent entity itsself.
m_iParentAttachment Unsigned Char The attachment point on the parent entity which this entity is held to.
movetype Unsigned Char Determines the movement behavior for this entity.
Values

/public/const.h#L191

  • 0 - None, don't move
  • 1 - Isometric
  • 2 - Walk, player only, moving on ground
  • 3 - NPC, movement
  • 4 - Fly, no gravity
  • 5 - Fly, with gravity
  • 6 - VPhysics
  • 7 - Push
  • 8 - Noclip
  • 9 - Ladder, for players on ladders
  • 10 - Spectator
  • 11 - Custom
movecollide Unsigned Char Determines the collision behavior for this entity.
Values

/public/const.h#L213

  • 0 - Default

// These ones only work for MOVETYPE_FLY + MOVETYPE_FLYGRAVITY

  • 1 - Fly/Bounce (Bounces, reflects, based on elasticity of surface and object - applies friction (adjust velocity))
  • 2 - Fly/Custom (Touch() will modify the velocity however it likes)
  • 3 - Fly/Slide (Slides along surfaces (no bounce) - applies friction (adjusts velocity))
m_angRotation Vector The rotation vector of this entity relative to it's parent. If this entity has no parent the vector is relative to the world. For players only Yaw is non zero.
m_iTextureFrameIndex Unsigned Char
predictable_id
m_PredictableID Integer
m_bIsPlayerSimulated Boolean
m_bSimulatedEveryTick Boolean
m_bAnimatedEveryTick Boolean
m_bAlternateSorting Boolean
m_nModelIndexOverrides
000 Integer For VISION_MODE_NONE
001 Integer For VISION_MODE_PYRO
002 Integer For VISION_MODE_HALLOWEEN
003 Integer For VISION_MODE_ROME

Entity DataMaps[edit | edit source]

CBaseEntity
Name Type Description
CBaseEntitySUB_CallUseToggle
CBaseEntitySUB_DoNothing
CBaseEntitySUB_FadeOut
CBaseEntitySUB_Remove
CBaseEntitySUB_StartFadeOut
CBaseEntitySUB_StartFadeOutInstant
CBaseEntitySUB_Vanish
CBaseEntityShadowCastDistThink
CBaseEntityScriptThink
InputAddContext Input (String)
InputAddOutput Input (String)
InputAlpha Input (Integer)
InputAlternativeSorting Input (Boolean)
InputClearContext Input (String)
InputClearParent Input (Void)
InputColor Input (Color32)
InputDisableDamageForces Input (Void)
InputDisableShadow Input (Void)
InputDispatchEffect Input (String)
InputDispatchResponse Input (String)
InputEnableDamageForces Input (Void)
InputEnableShadow Input (Void)
InputFireUser1 Input (String)
InputFireUser2 Input (String)
InputFireUser3 Input (String)
InputFireUser4 Input (String)
InputKill Input (Void)
InputKillHierarchy Input (Void)
InputRemoveContext Input (String)
InputSetDamageFilter Input (String)
InputSetParent Input (String)
InputSetParentAttachment Input (String)
InputSetParentAttachmentMaintainOffset Input (String)
InputSetTeam Input (Integer)
InputUse Input (Void)
InputRunScriptFile Input (String)
InputRunScript Input (String)
InputCallScriptFunction Input (String)
InputTerminateScriptScope Input (Void)
m_Collision
m_bUniformTriggerBloat Boolean Not in source?
m_flRadius Float
m_nSolidType Char
m_nSurroundType Char
m_triggerBloat Char
m_usSolidFlags Short
m_vecMaxs Vector The maxs coordinate point for the Collision bounding box of this entity after any changes are made to it, such as through the modelscale keyvalue.
m_vecMaxsPreScaled Vector The maxs coordinate point for the Collision bounding box of this entity before any changes are made to it, such as through the modelscale keyvalue.
m_vecMins Vector The mins coordinate point for the Collision bounding box of this entity after any changes are made to it, such as through the modelscale keyvalue.
m_vecMinsPreScaled Vector The mins coordinate point for the Collision bounding box of this entity before any changes are made to it, such as through the modelscale keyvalue.
m_vecSpecifiedSurroundingMaxs Vector
m_vecSpecifiedSurroundingMaxsPreScaled Vector
m_vecSpecifiedSurroundingMins Vector
m_vecSpecifiedSurroundingMinsPreScaled Vector
m_vecSurroundingMaxs Vector
m_vecSurroundingMins Vector
m_CollisionGroup Integer Modifies what this entity collides with.
Values

/public/const.h#L397

  • 0 - None
  • 1 - Collides with nothing but world and static stuff
  • 2 - Same as debris, but hits triggers
  • 3 - Collides with everything except other interactive debris or debris
  • 4 - Collides with everything except interactive debris or debris
  • 5 - COLLISION_GROUP_PLAYER,
  • 6 - COLLISION_GROUP_BREAKABLE_GLASS,
  • 7 - COLLISION_GROUP_VEHICLE,
  • 8 - For HL2, same as Collision_Group_Player, for TF2, this filters out other players and CBaseObjects
  • 9 - Generic NPC group
  • 10 - for any entity inside a vehicle
  • 11 - for any weapons that need collision detection
  • 12 - vehicle clip brush to restrict vehicle movement
  • 13 - Projectiles!
  • 14 - Blocks entities not permitted to get near moving doors
  • 15 - Doors that the player shouldn't collide with
  • 16 - Things that are dissolving are in this group
  • 17 - Nonsolid on client and server, pushaway in player code
  • 18 - Used so NPCs in scripts ignore the player.
  • 19 - Used for NPCs in scripts that should not collide with each other

/game/shared/tf2/tf_shareddefs.h#L104

  • 20 - TFCOLLISION_GROUP_SHIELD
  • 21 - TFCOLLISION_GROUP_WEAPON
  • 22 - TFCOLLISION_GROUP_GRENADE
  • 23 - TFCOLLISION_GROUP_RESOURCE_CHUNK
  • 24 - Combat objects (override for above)
  • 25 - TFCOLLISION_GROUP_OBJECT
  • 26 - TFCOLLISION_GROUP_OBJECT_SOLIDTOPLAYERMOVEMENT
m_ModelName String The model path and name for this entity
m_MoveCollide Char Determines the collision behavior for this entity.
Values

/public/const.h#L213

  • 0 - Default

// These ones only work for MOVETYPE_FLY + MOVETYPE_FLYGRAVITY

  • 1 - Fly/Bounce (Bounces, reflects, based on elasticity of surface and object - applies friction (adjust velocity))
  • 2 - Fly/Custom (Touch() will modify the velocity however it likes)
  • 3 - Fly/Slide (Slides along surfaces (no bounce) - applies friction (adjusts velocity))
m_MoveType Char Determines the movement behavior for this entity.
Values

/public/const.h#L191

  • 0 - None, don't move
  • 1 - Isometric
  • 2 - Walk, player only, moving on ground
  • 3 - NPC, movement
  • 4 - Fly, no gravity
  • 5 - Fly, with gravity
  • 6 - VPhysics
  • 7 - Push
  • 8 - Noclip
  • 9 - Ladder, for players on ladders
  • 10 - Spectator
  • 11 - Custom
m_Network
m_hParent Handle The parent entity to which this entity is attached.
m_OnUser1 Output
m_OnUser2 Output
m_OnUser3 Output
m_OnUser4 Output
m_ResponseContexts Vector
m_aThinkFunctions Vector
m_angAbsRotation Vector The rotation vector of this entity relative to the world.
m_angRotation Vector The rotation vector of this entity relative to it's parent. If it has no parent the vector will be relative to the world.
m_bAlternateSorting Boolean
m_bAnimatedEveryTick Boolean
m_bSimulatedEveryTick Boolean
m_clrRender Integer An integer representing the RGB render color of this entity.
Calculating The Value
RGB values can range from 0 to 255 individually, meaning the highest value can be represented by 8 bits. The integer used by this property is simply constructed from the bits of these values side by side. Starting from the right the first 8 bits (0-7) are used for blue, then the next 8 bits (8-15) are used by green, and finally the last 8 (16-23) are used by red. To convert your RGB color to an integer using this system, open the developer console in your browser by pressing F12, go to the Console tab, and type this:
(red << 16) + (green << 8) + blue

Where red green and blue are your RGB values, if a value is zero, you can just omit it, for example: (255 << 16) + 255 // = RGB(255, 0, 255)

m_debugOverlays Integer
m_fEffects Integer Entity effects bit flags.
Values

/public/const.h#L281

  • 1 - Performs bone merge on client side
  • 2 - Dynamic Light centered at entity origin
  • 4 - Player flashlight
  • 8 - Don't interpolate the next frame
  • 16 - Don't cast shadows
  • 32 - Don't draw entity
  • 64 - Don't receive shadows
  • 128 - For use with EF_BONEMERGE. If this is set, then it places this ent's origin at its parent and uses the parent's bbox + the max extents of the aiment. Otherwise, it sets up the parent's bones every frame to figure out where to place the aiment, which is inefficient because it'll setup the parent's bones even if the parent is not in the PVS.
  • 256 - Blink an item so that the user notices it
  • 512 - Always assume that the parent entity is animating
m_fFlags Integer Entity bit flags (Different from m_iEFlags)
Values

/public/const.h#L147

  • 1 - At rest / on the ground
  • 2 - Player flag -- Player is fully crouched
  • 4 - Player flag -- Player is in the process of crouching or uncrouching but could be in transition

// examples: // Fully ducked: FL_DUCKING & FL_ANIMDUCKING // Previously fully ducked, unducking in progress: FL_DUCKING & !FL_ANIMDUCKING // Fully unducked: !FL_DUCKING & !FL_ANIMDUCKING // Previously fully unducked, ducking in progress: !FL_DUCKING & FL_ANIMDUCKING

  • 8 - Player jumping out of water
  • 16 - Player is _controlling_ a train, so movement commands should be ignored on client during prediction.
  • 32 - Indicates the entity is standing in rain
  • 64 - Player is frozen for 3rd person camera
  • 128 - Player can't move, but keeps key inputs for controlling another entity
  • 256 - Is a player
  • 512 - Fake client, simulated server side; don't send network messages to them
  • 1024 - In water
  • 2048 - Changes the SV_Movestep() behavior to not need to be on ground
  • 4096 - Changes the SV_Movestep() behavior to not need to be on ground (but stay in water)
  • 8192 - FL_CONVEYOR
  • 16384 - FL_NPC
  • 32768 - FL_GODMODE
  • 65536 - FL_NOTARGET
  • 131072 - Set if the crosshair needs to aim onto the entity
  • 262144 - Not all corners are valid
  • 524288 - Eetsa static prop!
  • 1048576 - Worldgraph has this ent listed as something that blocks a connection
  • 2097152 - FL_GRENADE
  • 4194304 - Changes the SV_Movestep() behavior to not do any processing
  • 8388608 - Doesn't generate touch functions, generates Untouch() for anything it was touching when this flag was set
  • 16777216 - Base velocity has been applied this frame (used to convert base velocity into momentum)
  • 33554432 - Not moveable/removeable brush entity (really part of the world, but represented as an entity for transparency or something)
  • 67108864 - Terrible name. This is an object that NPCs should see. Missiles, for example.
  • 134217728 - This entity is marked for death -- will be freed by game DLL
  • 268435456 - You know... On fire!
  • 536870912 - We're dissolving!
  • 1073741824 - In the process of turning into a client side ragdoll.
  • 2147483648 - Pusher that can't be blocked by the player
m_flAnimTime Float
m_flDesiredShadowCastDistance Float
m_flElasticity Float
m_flFriction Float
m_flGravity Float A modifier for the gravity of this entity. 0 does not mean "zero gravity", but rather it means this datamap does not modify anything. 1 is normal gravity.
m_flGroundChangeTime Float
m_flLocalTime Float
m_flMoveDoneTime Float
m_flNavIgnoreUntilTime Float
m_flPrevAnimTime Float
m_flShadowCastDistance Float
m_flSimulationTime Float
m_flSpeed Float
m_flVPhysicsUpdateLocalTime Float
m_hDamageFilter Handle The entity used as a damage filter for this entity.
m_hEffectEntity Handle The entity which is used to affect this one. (Ignite/Dissolve)
m_hGroundEntity Handle The entity this entity is standing / laying on.
m_hMoveChild Handle The first immediate child of this entity in the movement hierarchy.
m_hMoveParent Handle The immediate parent of this entity in the movement hierarchy.
m_hMovePeer Handle The next immediate sibling (entity with the same parent) of this entity in the movement hierarchy.
m_hOwnerEntity Handle The owner of this entity, not to be confused with the parent (moveparent). A common example of ownership is players owning the projectiles that they fire. Some entities may not work properly if you create them without giving them an owner.
m_iClassname String The class name of this entity (not the C++ Class name).
m_iEFlags Integer Entity bit flags (Different from m_fFlags)
Values

/game/shared/shareddefs.h#L579

  • 1 - This entity is marked for death -- This allows the game to actually delete ents at a safe time
  • 2 - Entity is dormant, no updates to client
  • 4 - Lets us know when the noclip command is active.
  • 8 - Set while a model is setting up its bones.
  • 16 - This is a special entity that should not be deleted when we restart entities only
  • 16 - One of the child entities is a player.
  • 32 - Client only- need shadow manager to update the shadow...
  • 64 - Another entity is watching events on this entity (used by teleport)
  • 128 - Force the engine to transmit this entity even if it doesn't have a model
  • 256 - This is set on bots that are frozen.
  • 512 - Non-networked entity.
  • 1024 - Don't attach the edict; we're doing it explicitly
  • 2048 - EFL_DIRTY_ABSTRANSFORM
  • 4096 - EFL_DIRTY_ABSVELOCITY
  • 8192 - EFL_DIRTY_ABSANGVELOCITY
  • 16384 - EFL_DIRTY_SURROUNDING_COLLISION_BOUNDS
  • 32768 - EFL_DIRTY_SPATIAL_PARTITION
  • 65536 - UNUSED
  • 131072 - This is set if the entity detects that it's in the skybox and forces it to pass the "in PVS" for transmission.
  • 262144 - Entities with this flag set show up in the partition even when not solid
  • 524288 - Used to determine if an entity is floating
  • 1048576 - EFL_IS_BEING_LIFTED_BY_BARNACLE
  • 2097152 - I shouldn't be pushed by the rotorwash
  • 4194304 - EFL_NO_THINK_FUNCTION
  • 8388608 - EFL_NO_GAME_PHYSICS_SIMULATION
  • 16777216 - EFL_CHECK_UNTOUCH
  • 33554432 - I shouldn't block NPC line-of-sight
  • 67108864 - NPC's should not walk on this entity
  • 134217728 - These guys shouldn't dissolve
  • 268435456 - Mega physcannon can't ragdoll these guys.
  • 536870912 - Don't adjust this entity's velocity when transitioning into water
  • 1073741824 - Physcannon can't pick these up or punt them
  • 2147483648 - Doesn't accept forces from physics damage
m_iGlobalname String A string used to preserve entity state between map changes. When a map change is initiated, this entity will have it's entity state transferred over to entities in the new map with global names matching this one.
m_iHammerID Integer An ID unique to the entity type (if it's a brush it'll be unique between all brushes). An entity will only have a Hammer ID if it was compiled with the map (if it's not dynamically spawned).
m_iHealth Integer The current health of this entity.
m_iInitialTeamNum Integer The initial team this entity is a part of when it spawns. For players this is just 0.
Values
  • 0 - None
  • 1 - Spectator
  • 2 - RED
  • 3 - BLU
  • 5 - Boss / Neutral
m_iMaxHealth Integer The max health of this entity.
m_iName String The targetname of this entity.
m_iParent String The targetname of the parent of this entity.
m_iParentAttachment Char The attachment point on the parent entity which this entity is held to.
m_iTeamNum Integer The team this entity is a part of.
Values
  • 0 - None
  • 1 - Spectator
  • 2 - RED
  • 3 - BLU
  • 5 - Boss / Neutral
m_iTextureFrameIndex Char
m_iszDamageFilterName String The targetname of the damage filter for this entity.
m_iszResponseContext String
m_lifeState Char Am I alive?
Values

/public/const.h#L273

  • 0 - Alive
  • 1 - Playing death animation or still falling off of a ledge waiting to hit ground. (Does not apply to players.)
  • 2 - Dead, lying still. (Players will instantly have this set upon dying.)
  • 3 - LIFE_RESPAWNABLE
  • 4 - LIFE_DISCARDBODY
m_nLastThinkTick Integer
m_nModelIndex Short The index for this entity's precached model. Changing this does nothing in TF2.
m_nModelIndexOverrides Array (Integer)
m_nNextThinkTick Integer
m_nRenderFX Char Alpha render effects enum.
Values

/public/const.h#L367

  • 0 - None
  • 1 - Slow Pulse (varies alpha by ±16 over a period of 1.5 s)
  • 2 - Fast Pulse (varies alpha by ±16 over a period of 0.4 s)
  • 3 - Slow Wide Pulse (varies alpha by ±64 over a period of 1.5 s)
  • 4 - Fast Wide Pulse (varies alpha by ±64 over a period of 0.4 s)
  • 5 - Slow Fade Away (decreases alpha by -1 per frame, fades out over 4 s)
  • 6 - Fast Fade Away (decreases alpha by -4 per frame, fades out over 1 s)
  • 7 - Slow Become Solid (increases alpha by +1 per frame, fades in over 4 s)
  • 8 - Fast Become Solid (increases alpha by +4 per frame, fades in over 1 s)
  • 9 - Slow Strobe (transparent 0.8 s, visible 0.8 s, repeat)
  • 10 - Fast Strobe (transparent 0.2 s, visible 0.2 s, repeat)
  • 11 - Faster Strobe (transparent 0.09 s, visible 0.09 s, repeat)
  • 12 - Slow Flicker (transparent 0.18 s, visible 1.5 s, repeat)
  • 13 - Fast Flicker (transparent 0.14 s, visible 0.2 s, repeat)
  • 14 - Constant Glow ("NoDissipation;" purpose uncertain—for sprites?)
  • 15 - Distort (causes unnatural flickering and position shifting), Fade Out (instant; not very useful outside of code)
  • 16 - Hologram (Distort + "distance fade"), Fade In (instant; not very useful outside of code)
  • 17 - Scale Up ("Explode"/"scale up really big!" causes wild stretching of model parts), Fade Wider Pulse (varies alpha by ±255 over a period over a period of 0.26 s)
  • 18 - Glow Shell (purpose unclear)
  • 19 - Clamp Minimum Scale ("keep this sprite from getting very small (SPRITES only!)")
  • 20 - Environmental Rain ("for environmental rendermode, make rain")
  • 21 - Environmental Snow ("for environmental rendermode, make snow")
  • 22 - Spotlight FX ("TEST CODE for experimental spotlight")
  • 23 - Ragdoll ("HACKHACK: TEST CODE for signalling death of a ragdoll character;" ragdolls an entity but doesn't kill it)
  • 24 - Fade Wider Pulse (varies alpha by ±255 over a period of 0.26 s)
m_nRenderMode Char The mode in which this entity should attempt to be rendered.
Values

/public/const.h#L350

  • 0 - Normal
  • 1 - Color
  • 2 - Texture
  • 3 - Glow
  • 4 - Solid/Alphatest
  • 5 - Additive
  • 6 - Removed, does nothing
  • 7 - Additive Fractional Frame
  • 8 - Alpha Add
  • 9 - World Space Glow
  • 10 - Don't Render
m_nSimulationTick Integer
m_nTransmitStateOwnedCounter Char
m_nWaterLevel Char How far this entity is submerged in water. For players, the values are like so:
Values
  • 0 - Not touching water.
  • 1 - Touching water, but our movement is unaffected. (Water at our feet)
  • 2 - Swimming, but our head isn't below the surface. (We can still breath)
  • 3 - Completely submerged in water.
m_nWaterType Char
m_pBlocker Handle
m_pParent Handle
m_pPhysicsObject Handle
m_pfnBlocked Function
m_pfnMoveDone Function
m_pfnThink Function
m_pfnTouch Function
m_pfnUse Function
m_rgflCoordinateFrame Array (Float)
m_spawnflags Integer The spawnflags for this entity.
m_takedamage Char
m_target String
m_vecAbsOrigin Vector The absolute position of this entity relative to the world.
m_vecAbsVelocity Vector The absolute velocity of this entity relative to the world.
m_vecAngVelocity Vector
m_vecBaseVelocity Vector
m_vecOrigin Vector The local position of this entity relative to it's parent. If this entity has no parent, the position is relative to the world
m_vecVelocity Vector The local velocity of this entity relative to it's parent. If this entity has no parent, the velocity is relative to the world.
m_vecViewOffset Vector
touchStamp Integer
m_iszScriptId
m_iszVScripts
m_iszScriptThinkFunction
m_bForcePurgeFixedupStrings