First Person Ragdolls
This article is actively undergoing a major edit.
The person who added this notice will be listed in its edit history should you wish to contact them.
In most Source multi-player mods, when a player dies the view switches from first to third person perspective. This following simple code change allows you to give the player an option of seeing things from the ragdolls perspective, in short letting it see the world through the ragdoll's own eyes.
For the code to work, your player model needs an attachment called
eyes which represents where on the ragdoll the players view will come from. In the case of the default HL2 human characters they already have one but if your player model doesn't you can add it in via the QC File and HLMV.
The following is for mods based on HL2DM but should work with others with some minor editing.
As this code is clientside, we're making edits to the file
The first part is to add a console command to enable or disable first person ragdolls. This should be placed at the top of the file along with the other console commands:
static ConVar cl_fpragdoll ( "cl_fpragdoll", "0", FCVAR_DONTRECORD | FCVAR_ARCHIVE, "Use first person ragdolls" );