View Single Post
Author Message
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 11-15-2019 , 05:19   [L4D2] Client-sided Survivor Ragdolls
Reply With Quote #1

First plugin released into the public.

This is like Mr. Zero's Restore Ragdoll plugin, except it functions on ALL deaths, including suicides.
You can also choose to make the static death model invisible, remove it, or do nothing to the body.

It also comes with manually spawning the ragdolls yourself, for funsies.
The plugin supports L4D1, but only has the feature to manual-spawn ragdolls.

There's a toggleable function to stop m_isFallingFromLedge deaths from removing the static model.
However, it uses the same method Zero used to know if a player will die, so it will not be able to detect suicides/slays.
But survivors that were falling are already going to die anyway, and it works for just falling to your death, so it shouldn't be much of a problem to keep this feature on.

-= ConVars/Commands =-
sm_custom_survivor_ragdoll 1 - min:0/max:1
^ Toggle usage of non-ledge based ragdoll deaths.

sm_c_survivor_ragdoll_staticbody 0 - min:0/max:2
^ 0 - Make static body invisible. 1 - Remove static body. 2 - Do nothing. 3 - Make static body transparent.

sm_c_survivor_ragdoll_ledge 1 - min:0/max:1
^ Toggle preventing ledge deaths from making victims unrevivable.

sm_c_survivor_ragdoll_nolimit 0 - min:0/max:1
^ 0 - Use game's preferred ragdoll limits. 1 - Use CI ragdoll limits. (Beware - this could wreak havoc on older computers!)

sm_c_survivor_ragdoll_dual_drop 1 - min:0/max:1
^ Toggle whether players should drop their extra pistol upon death.

sm_ragdoll = Spawn a client ragdoll on yourself.

-= Further Info =-

- The plugin automatically adds a function to the admin menu called 'Spawn ragdoll on' that lets you manually spawn a ragdoll on a chosen player from it's list.
- <BUG> Manually spawning a ragdoll on anyone has the chance to make them invisible on one or more client's ends. Could possibly be caused by the method of setting the ragdoll's player netprop to the chosen player.


-= Releases =-
Code:
Version 1.1.5
- Some optimization and refactoring of previous code ugliness, and removed useless commented code.
Version 1.1.4
- Preventing ledge-hanging fall deaths from removing the death model now uses the method Zero used to detect whether a survivor is going to die.
This lets survivors play the falling animation properly again, but also results in inaccuracies with slays/suicides whilst falling.
Version 1.1.3
- Fixed 'Spawn ragdoll on' not getting added to admin menu upon plugin's first load on a new map. Definitely.
Version 1.1.2
- Fixed a bug with sm_c_survivor_ragdoll_dual_drop that made non-dual wielding players drop an extra pistol after they die and get revived.
Version 1.1.1
- Added sm_c_survivor_ragdoll_dual_drop.
Version 1.1.0
- Attempt to fix 'Spawn ragdoll on' not getting added to admin menu upon plugin's first load on a new map.
Version 1.0.9
- Added sm_c_survivor_ragdoll_nolimit.
Version 1.0.7
- Used PostThinkPost hook instead of PreThink on Lux's suggestion.
- Edited code's replacement for falling-off-after-hanging deaths.
Version 1.0.6
- Usage of m_iDeathPose and m_iDeathFrame now results in (almost) proper ragdoll deaths.
Version 1.0.5
- Used a better system of checking whether the game spawned a ledge ragdoll as opposed to a boolean.
- Minor changes to the code.
Version 1.0.1
- Updated various text in the plugin.
Version 1.0.0
- Initial release.
Attached Files
File Type: sp Get Plugin or Get Source (L4D2CSRagdoll.sp - 602 views - 15.9 KB)
__________________
ragdoll spam, that is all

Steam profile, where I game, obviously.
Youtube channel, where I do Stick Death Maze animations and some other stuff.
no plugin requests, sorry


My Plugins:
-search list-
Modified Plugins:
1 | 2 | 3 | 4

Last edited by Shadowysn; 12-02-2022 at 06:28. Reason: Updated to Version 1.1.5
Shadowysn is offline