View Single Post
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 09-24-2014 , 13:44   Re: [L4D2] Restore Ragdolls (1.3.0 2014-01-10)
Reply With Quote #19

Quote:
Originally Posted by Xaflu View Post
Just use a local server.

Also, there are 3 instances where you don't ragdoll on death.
1. If you type kill in console
2. If sm_cvar survivor_death_anims is 1
3. If a charger knocks you off an edge while plowing through you while they're already holding a survivor.

Other than those 3, it's great!
For Number 2;
[L4D2] Restore Death Animations

For Number 1, In the plugin code for whatever command you want, look for ForcePlayerSuicide() and on the line above add the following, and you should get the desired results.

PHP Code:
SetEntProp(targetProp_Send"m_isFallingFromLedge"1); 
Let's look at slay.sp for example;
PHP Code:
PerformSlay(clienttarget)
{
    
LogAction(clienttarget"\"%L\" slayed \"%L\""clienttarget);
    
ForcePlayerSuicide(target);

Should be;
PHP Code:
PerformSlay(clienttarget)
{
    
LogAction(clienttarget"\"%L\" slayed \"%L\""clienttarget);
    
SetEntProp(targetProp_Send"m_isFallingFromLedge"1);
    
ForcePlayerSuicide(target);

Save slay.sp, Recompile PlayerCommands, and whenever someone is slain via !slay, they will now ragdoll.

This means the only possible scenario where you won't ragdoll is when you either, use ForcePlayerSuicicide() without adding the above and re-compiling, kill cmd from console, or when you fall from a Reasonable height that would insta-kill you.

__________________
DeathChaos25 is offline