Split
It has been suggested that this article or section be split into multiple articles: Split Black Mesa and Valve games to separate pages. (Discuss)
prop_ragdoll can interact with dynamic objects, unlike death ragdolls.
prop_ragdoll is a model entity available in all
Source games. It is a VPhysics ragdoll. Ragdolls are collections of physics objects constrained together to simulate a jointed object like a dead body. They are very expensive to simulate.
Warning:This entity generates server-side ragdolls, which collide with everything but produce very large amounts of network traffic. Network traffic can be significantly reduced by making the ragdoll start asleep, disabling motion and disabling collisions with dynamic objects (!FGD add "solid" keyvalue with value of 0) and only enabling motion when necessary.
Bug:Setting a custom pose via Hammer and making the ragdoll start asleep will make the rendering box fail to update. Making the ragdoll wake for a single frame when spawned and then sleeping it will fix this issue. (tested in:
,
)
Bug:
Portal 2 ragdolls cannot pass through portals. This often occurs in
Portal as well.
Bug:Ragdolls are ignored in prediction, this causes lots of prediction errors when touching a ragdoll. (tested in:
,
)
AltNames: This entity is also tied to physics_prop_ragdoll.
Black Mesa specific notices and bugs.
Note:Original entity version is available as prop_ragdoll_original. The difference is: prop_ragdoll_original can't be gibbed with explosions, crowbar can hit prop_ragdoll_original if [4] Debris spawnflag is unchecked (crowbar's raycast skips prop_ragdoll for some reason), prop_ragdoll_original doesn't bleed or have decals on it, prop_ragdoll_original can't be picked up, prop_ragdoll_original have realistic bullet push.
Bug:
- server side ragdolls created by NPCs never gib before loading save since the first Steam version, the same for gibs created by gibbed ragdolls. Use the workshop addon if you want to use server side ragdolls in your mod.
- crowbar's raycast skips/ignores server side ragdolls since the first Steam version.
- Tripmines do not gib ragdolls
- In multiplayer ragdolls do not create hole decals and blood from bullets if
[4] Debris spawnflag is enabled. If this flag is disabled - ragdolls still will not create blood effects and hand blood overlays.
|
Death Ragdolls/Ragdoll Transformation
When a NPC/player dies or an entity receives the BecomeRagdoll input, it normally creates a client-side ragdoll and copies most of its animation and visual data to it. Unlike server-side prop_ragdolls, these client-side ragdolls are handled completely on a per-client basis and are much cheaper and simpler than their server-side counterparts, at the expense of being virtually nonexistent on the server, being inconsistent across client perspectives, and only colliding with entities that have physics objects on the client (e.g. worldspawn).
However, a NPC will become a server-side ragdoll while it's under any of the following conditions:
These server-side death ragdolls will collide with physics objects and beyond, like any prop_ragdoll, but they are marked as debris and do not collide with each other. They do not collide with themselves either, unlike client-side ragdolls (fixed in
Entropy : Zero 2
and
Black Mesa). This is believed to be intentional behavior to reduce performance/networking costs.
Bug:Server side ragdolls don't save blood decals. Fixed in
Mapbase and
Black Mesa. (tested in:
,
)
Note:Most of this list theoretically applies to players as well, although that hasn't been tested.
Warning:While most of the relevant animation/visual data is copied to ragdolls, some fields, like fade distances, are not transferred.
Code:This can be modified at CBaseAnimating::CopyAnimationDataFrom() in baseanimating.cpp for server-side ragdolls and C_BaseAnimating::CreateRagdollCopy() in c_baseanimating.cpp for client-side ragdolls.
Keyvalues
- Name (targetname) <string>
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
- Override Animation (angleOverride) <string>
- List of joint rotations in the format
index,x y z,.... Filled in by the engine via hammer_update_entity or after simulating ragdolls in
Hammer++ physics simulation.
Non-Valve games 
- Health (health) <integer> (only in
)
- The amount of damage the ragdoll takes before gibbing.
- Character Manifest Mimic Name (MimicName) <string> (only in
)
- Choose a name or a classname from the character manifest to dress the ragdoll.
GMODSandbox:
- Allow Physics Gun (gmod_allowphysgun) <boolean> (only in
)
- If set, players cannot use Physics Gun on this entity.
- Sandbox Tool Whitelist (gmod_allowtools) <string> (only in
)
- If set, only given tools can be used on this entity. You need to supply the tool class names, the names of the
.lua files of those tools. This also includes the context menu properties!
|
CBaseAnimating
CBaseAnimating:
- World Model (model) <model path>
- The model this entity should appear as. 128-character limit.
- Skin (skin) <integer>
- Some models have multiple skins. This value selects from the index, starting with 0. May be overridden by game code.
Tip:Hammer's model browser automatically updates this value if you use it to view different skins.
- Model Scale (modelscale) <float>
- A multiplier for the size of the model.
Tip:In Hammer++ with a prop selected in 3D view, hold Ctrl and scroll the mouse wheel to change the modelscale in increments of 0.5. Holding ⇧ Shift will scale it in smaller increments of 0.05.
- Bodygroup (body / SetBodyGroup) <integer>
- Some models have multiple submodels. This value selects from the index, starting with 0. May be overridden by animations and/or game code.
Note:If both body and SetBodyGroup are present (even if set to 0), body will be prioritized.
- Lighting Origin (lightingorigin) <targetname>
- Select an entity (not info_lighting!) from which to sample lighting and cubemaps instead of the entity's $illumposition.
Shadow:
- Disable Shadows (disableshadows) <boolean>
- Prevents the entity from creating cheap render-to-texture shadows, or lightmap shadows if the entity is a prop_static. Does not affect shadow mapping.
- Shadow Cast Distance (shadowcastdist) <integer> !FGD
- Sets how far the entity casts dynamic shadows. 0 means default distance from the shadow_control entity.
- Disable Receiving Shadows (disablereceiveshadows) <boolean>
- Prevent the entity from receiving dynamic shadows on itself.
- Disable Shadow Depth (disableshadowdepth) <boolean> (in all games since
)
- Used to disable rendering into shadow depth (for projected textures) for this entity.
- Disable flashlight (disableflashlight) <boolean> (in all games since
)
- Used to disable projected texture lighting and shadows on this entity.
- Projected Texture Cache (shadowdepthnocache) <integer choices> (in all games since
)
- Used to hint projected texture system whether it is sufficient to cache shadow volume of this entity or to force render it every frame instead.
Choices
- 0 : Default
- 1 : No cache - render every frame
- 2 : Cache it - render only once
|
- Render in Fast Reflections (drawinfastreflection) <boolean> (in all games since
)
- If enabled, this entity will render in fast water reflections (i.e. when a water material specifies
$reflectonlymarkedentities) and in the world impostor pass.
|
Flags
- Debris : [4]
- Don't collide with the player or other debris
- Use 'Least Recently Used' Retirement : [4096] !FGD
- LRU in this case it's referring to Source's ragdoll cleanup system, which automatically removes ragdolls which haven't been used. Serverside ragdolls spawned by NPCs are automatically added to this system, while prop_ragdolls spawned by the map are not
- Allow Dissolve : [8192] (only in


[confirm])
- Allow dissolve by prop_combine_ball
- Motion Disabled : [16384]
- Allow stretch : [32768]
- Start asleep : [65536]
Inputs
- StartRagdollBoogie
- Begins ragdoll boogie effect for 5 seconds.
Bug:This input is actually supposed to use a parameter for how long the ragdoll should boogie, but it uses the wrong field type in the data description.
Code Fix:In CRagdollProp's data description, find DEFINE_INPUTFUNC( FIELD_VOID, "StartRagdollBoogie", InputStartRadgollBoogie ) and replace FIELD_VOID with FIELD_FLOAT.
- EnableMotion / DisableMotion
- Enable / disable physics simulation.
- FadeAndRemove (in all games since
)
- Fade out then remove (kill) self. Parameter override = duration of fade.
- AllowBloodPool (only in
) !FGD
- Сorpse once will create pool of blood (particle effect) if it is placed on brush.
Note:Not available for prop_ragdoll_original and prop_ragdoll_attached.
See Also