Revision Difference
Global.ClientsideRagdoll#561349
<function name="ClientsideRagdoll" parent="Global" type="libraryfunc">
<description>
Creates a fully clientside ragdoll.
<note>The ragdoll initially starts as hidden and with shadows disabled, see the example for how to enable it.
There's no need to call <page>Entity:Spawn</page> on this entity.
The physics won't initialize at all if the model hasn't been precached serverside first.</note>
The Physics won't initialize at all if the model hasn't been precached or spawned serverside first on x86-64 (x86-64 does not use dynamic model indexes whereas main branch does).</note>
<bug issue="1387">Clientside entities are not garbage-collected, thus you must store a reference to the object and call <page>CSEnt:Remove</page> manually.</bug>
</description>
<realm>Client</realm>
<args>
<arg name="model" type="string">The file path to the model.</arg>
<arg name="renderGroup" type="number" default="RENDERGROUP_OPAQUE">The <page>Enums/RENDERGROUP</page> to assign.</arg>
</args>
<rets>
<ret name="" type="CSEnt">The newly created client-side ragdoll. ( C_ClientRagdoll )</ret>
</rets>
</function>
<example>
<description>Creates a new ragdoll with the player model of breen and enables rendering and shadows.</description>
<code>
local ragdoll = ClientsideRagdoll( "models/player/breen.mdl" )
ragdoll:SetNoDraw( false )
ragdoll:DrawShadow( true )
</code>
</example>